From d65c43199affd799cf6ef7b71d85e7591fa3d347 Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Wed, 24 Jul 2024 12:35:19 -0700 Subject: [PATCH] Fix ModulusAnimatedNode Summary: For the Kotlinification of AnimatedNode to work correctly, fix ModulusAnimatedNode changelog: [internal] internal Differential Revision: D60188329 --- .../java/com/facebook/react/animated/ModulusAnimatedNode.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.kt index 79ff6a3d29095a..fccc8474fe7712 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.kt @@ -21,7 +21,7 @@ internal class ModulusAnimatedNode( override public fun update() { val animatedNode = nativeAnimatedNodesManager.getNodeById(inputNode) if (animatedNode is ValueAnimatedNode) { - val animatedNodeValue = animatedNode.value + val animatedNodeValue = animatedNode.mValue mValue = (animatedNodeValue % modulus + modulus) % modulus } else { throw JSApplicationCausedNativeException(