From 08f41bcbf4bfa208ce32572cb3e934a66fa97481 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Tue, 13 Jun 2017 08:31:23 -0700 Subject: [PATCH] Native Animated - Call x.__makeNative before super.__makeNative Summary: This fixes a `Attempt to get native tag from node not marked as "native"` error that happens because some animated values are not converted to native before calling the base class `__makeNative`. This makes sure we call the `__makeNative` method of input nodes before calling `super.__makeNative`. **Test plan** Tested that it fixes the issue I encountered and that native animations still work with properly in RNTester. Closes https://github.com/facebook/react-native/pull/14435 Differential Revision: D5236092 Pulled By: javache fbshipit-source-id: cb02616aec05f220c65b58831ca4334b58d0383b --- Libraries/Animated/src/AnimatedImplementation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Libraries/Animated/src/AnimatedImplementation.js b/Libraries/Animated/src/AnimatedImplementation.js index 5143899de1cd26..1d6c7aba529986 100644 --- a/Libraries/Animated/src/AnimatedImplementation.js +++ b/Libraries/Animated/src/AnimatedImplementation.js @@ -1218,9 +1218,9 @@ class AnimatedDivision extends AnimatedWithChildren { } __makeNative() { - super.__makeNative(); this._a.__makeNative(); this._b.__makeNative(); + super.__makeNative(); } __getValue(): number { @@ -1266,9 +1266,9 @@ class AnimatedMultiplication extends AnimatedWithChildren { } __makeNative() { - super.__makeNative(); this._a.__makeNative(); this._b.__makeNative(); + super.__makeNative(); } __getValue(): number { @@ -1309,8 +1309,8 @@ class AnimatedModulo extends AnimatedWithChildren { } __makeNative() { - super.__makeNative(); this._a.__makeNative(); + super.__makeNative(); } __getValue(): number { @@ -1356,8 +1356,8 @@ class AnimatedDiffClamp extends AnimatedWithChildren { } __makeNative() { - super.__makeNative(); this._a.__makeNative(); + super.__makeNative(); } interpolate(config: InterpolationConfigType): AnimatedInterpolation {