Skip to content

Commit f704441

Browse files
janicduplessisfacebook-github-bot
authored andcommitted
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 facebook#14435 Differential Revision: D5236092 Pulled By: javache fbshipit-source-id: cb02616aec05f220c65b58831ca4334b58d0383b
1 parent 1dd825d commit f704441

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Libraries/Animated/src/AnimatedImplementation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,9 +1218,9 @@ class AnimatedDivision extends AnimatedWithChildren {
12181218
}
12191219
12201220
__makeNative() {
1221-
super.__makeNative();
12221221
this._a.__makeNative();
12231222
this._b.__makeNative();
1223+
super.__makeNative();
12241224
}
12251225
12261226
__getValue(): number {
@@ -1266,9 +1266,9 @@ class AnimatedMultiplication extends AnimatedWithChildren {
12661266
}
12671267
12681268
__makeNative() {
1269-
super.__makeNative();
12701269
this._a.__makeNative();
12711270
this._b.__makeNative();
1271+
super.__makeNative();
12721272
}
12731273
12741274
__getValue(): number {
@@ -1309,8 +1309,8 @@ class AnimatedModulo extends AnimatedWithChildren {
13091309
}
13101310
13111311
__makeNative() {
1312-
super.__makeNative();
13131312
this._a.__makeNative();
1313+
super.__makeNative();
13141314
}
13151315
13161316
__getValue(): number {
@@ -1356,8 +1356,8 @@ class AnimatedDiffClamp extends AnimatedWithChildren {
13561356
}
13571357
13581358
__makeNative() {
1359-
super.__makeNative();
13601359
this._a.__makeNative();
1360+
super.__makeNative();
13611361
}
13621362
13631363
interpolate(config: InterpolationConfigType): AnimatedInterpolation {

0 commit comments

Comments
 (0)