Skip to content

Commit

Permalink
chore: Update AnimatedStyle constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldonadel committed Nov 17, 2022
1 parent 650c45e commit 11daeda
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Libraries/Animated/nodes/AnimatedStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ export default class AnimatedStyle extends AnimatedWithChildren {

constructor(style: any) {
super();
this._inputStyle = style;
this._style =
Platform.OS === 'web'
? createAnimatedStyle(style)
: createStyleWithAnimatedTransform(style);
if (Platform.OS === 'web') {
this._inputStyle = style;
this._style = createAnimatedStyle(style);
} else {
this._style = createStyleWithAnimatedTransform(style);
}
}

// Recursively get values for nested styles (like iOS's shadowOffset)
Expand Down

0 comments on commit 11daeda

Please sign in to comment.