Skip to content

Commit

Permalink
refactor: removes null coalescing
Browse files Browse the repository at this point in the history
If there is no property, it's better
to throw an error than to silence it.
  • Loading branch information
tuliomir committed Sep 15, 2023
1 parent 3da9db2 commit d6dc13e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/screens/CreateTokenAmount.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class CreateTokenAmount extends React.Component {
<HathorHeader
title={t`CREATE TOKEN`}
onBackPress={() => this.props.navigation.goBack()}
onCancel={() => this.props.navigation.getParent()?.goBack()}
onCancel={() => this.props.navigation.getParent().goBack()}
/>
<KeyboardAvoidingView behavior='padding' style={{ flex: 1 }} keyboardVerticalOffset={getKeyboardAvoidingViewTopDistance()}>
<View style={{ flex: 1, padding: 16, justifyContent: 'space-between' }}>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/CreateTokenConfirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class CreateTokenConfirm extends React.Component {
<HathorHeader
title={t`CREATE TOKEN`}
onBackPress={() => this.props.navigation.goBack()}
onCancel={() => this.props.navigation.getParent()?.goBack()}
onCancel={() => this.props.navigation.getParent().goBack()}
/>

{ this.state.modal && (
Expand Down
2 changes: 1 addition & 1 deletion src/screens/CreateTokenName.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CreateTokenName extends React.Component {
<HathorHeader
title={t`CREATE TOKEN`}
onBackPress={() => this.props.navigation.pop()}
onCancel={() => this.props.navigation.getParent()?.goBack()}
onCancel={() => this.props.navigation.getParent().goBack()}
/>
<KeyboardAvoidingView behavior='padding' style={{ flex: 1 }} keyboardVerticalOffset={getKeyboardAvoidingViewTopDistance()}>
<View style={{ flex: 1, padding: 16, justifyContent: 'space-between' }}>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/CreateTokenSymbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CreateTokenSymbol extends React.Component {
<HathorHeader
title={t`CREATE TOKEN`}
onBackPress={() => this.props.navigation.goBack()}
onCancel={() => this.props.navigation.getParent()?.goBack()}
onCancel={() => this.props.navigation.getParent().goBack()}
/>
<KeyboardAvoidingView behavior='padding' style={{ flex: 1 }} keyboardVerticalOffset={getKeyboardAvoidingViewTopDistance()}>
<View style={{ flex: 1, padding: 16, justifyContent: 'space-between' }}>
Expand Down

0 comments on commit d6dc13e

Please sign in to comment.