diff --git a/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp b/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp index c1eb2747c63..131c034cb38 100644 --- a/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp +++ b/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp @@ -55,19 +55,12 @@ void LayoutAnimationDriver::animationMutationsForFrame( animationInterpolationFactor, baselineShadowView, finalShadowView); // Create the mutation instruction - auto updateMutation = ShadowViewMutation::UpdateMutation( - keyframe.viewPrev, mutatedShadowView); + mutationsList.emplace_back(ShadowViewMutation::UpdateMutation( + keyframe.viewPrev, mutatedShadowView)); - // All generated Update mutations must have an "old" and "new" - // ShadowView. Checking for nonzero tag doesn't guarantee that the views - // are valid/correct, just that something is there. - react_native_assert(updateMutation.oldChildShadowView.tag > 0); - react_native_assert(updateMutation.newChildShadowView.tag > 0); - - mutationsList.push_back(updateMutation); PrintMutationInstruction("Animation Progress:", updateMutation); - keyframe.viewPrev = mutatedShadowView; + keyframe.viewPrev = std::move(mutatedShadowView); if (animationTimeProgressLinear < 1) { incompleteAnimations++;