Permalink
Browse files

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 #14435

Differential Revision: D5236092

Pulled By: javache

fbshipit-source-id: cb02616aec05f220c65b58831ca4334b58d0383b
  • Loading branch information...
janicduplessis authored and facebook-github-bot committed Jun 13, 2017
1 parent 1dd825d commit f7044419bee166139c91134cf240ea353c0770d2
Showing with 4 additions and 4 deletions.
  1. +4 −4 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 {

0 comments on commit f704441

Please sign in to comment.