Skip to content

Commit

Permalink
make AnimatedValueXY constructor input value immutable
Browse files Browse the repository at this point in the history
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 52ffa5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Animated/src/nodes/AnimatedValueXY.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 52ffa5d

Please sign in to comment.