Skip to content

Commit

Permalink
fix: undefined shadowRadius
Browse files Browse the repository at this point in the history
  • Loading branch information
Zivsteve committed Apr 30, 2021
1 parent 36854c4 commit 460ce3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/BoxShadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class BoxShadow extends Component<BoxShadowProps> {

const shadowRadius = style.shadowRadius as any;
let radius = shadowRadius / 20;
if (typeof shadowRadius._value !== 'undefined') {
if (typeof shadowRadius?._value !== 'undefined') {
(shadowRadius as Animated.Value).addListener(({ value }) => this.setState({ radius: value / 20 }));
} else {
this.setState({ radius });
Expand Down

0 comments on commit 460ce3d

Please sign in to comment.