From 52ffa5d13ef6fe2752bc8f838dc1c2dfe651bb64 Mon Sep 17 00:00:00 2001 From: Jiajie Zhu Date: Thu, 18 Jan 2018 10:31:13 -0800 Subject: [PATCH] make AnimatedValueXY constructor input value immutable Reviewed By: furdei Differential Revision: D6741521 fbshipit-source-id: e8401982fbb3c3d6cd4bcc2581358fd4a5de12f9 --- Libraries/Animated/src/nodes/AnimatedValueXY.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Animated/src/nodes/AnimatedValueXY.js b/Libraries/Animated/src/nodes/AnimatedValueXY.js index 4df709729b4130..13aee1e50d1cde 100644 --- a/Libraries/Animated/src/nodes/AnimatedValueXY.js +++ b/Libraries/Animated/src/nodes/AnimatedValueXY.js @@ -33,7 +33,7 @@ class AnimatedValueXY extends AnimatedWithChildren { _listeners: {[key: string]: {x: string, y: string}}; constructor( - valueIn?: ?{x: number | AnimatedValue, y: number | AnimatedValue}, + valueIn?: ?{+x: number | AnimatedValue, +y: number | AnimatedValue}, ) { super(); const value: any = valueIn || {x: 0, y: 0}; // @flowfixme: shouldn't need `: any`