Skip to content

Commit

Permalink
use optional chaining on react children
Browse files Browse the repository at this point in the history
  • Loading branch information
EtDu committed Oct 22, 2020
1 parent 65c904f commit 7fe798e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/UI/AnimatedTransactionModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class AnimatedTransactionModal extends PureComponent {
};

state = {
originComponent: React.Children.toArray(this.props.children).length > 1 ? 'dapp' : 'wallet',
originComponent: React.Children.toArray(this.props?.children).length > 1 ? 'dapp' : 'wallet',
modalValue:
React.Children.toArray(this.props.children).length > 1 ? new Animated.Value(1) : new Animated.Value(0),
React.Children.toArray(this.props?.children).length > 1 ? new Animated.Value(1) : new Animated.Value(0),
width: Device.getDeviceWidth(),
rootHeight: null,
customGasHeight: null,
Expand Down

0 comments on commit 7fe798e

Please sign in to comment.