Permalink
Browse files

make AnimatedValueXY constructor input value immutable

Reviewed By: furdei

Differential Revision: D6741521

fbshipit-source-id: e8401982fbb3c3d6cd4bcc2581358fd4a5de12f9
  • Loading branch information...
zjj010104 authored and facebook-github-bot committed Jan 18, 2018
1 parent b5e19ad commit 52ffa5d13ef6fe2752bc8f838dc1c2dfe651bb64
Showing with 1 addition and 1 deletion.
  1. +1 −1 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`

0 comments on commit 52ffa5d

Please sign in to comment.