Skip to content

Commit

Permalink
Merge pull request #10092 from Expensify/neil-plaid-data-crash
Browse files Browse the repository at this point in the history
Prevent rendering plaidData.error as empty string
  • Loading branch information
luacmartins authored Jul 26, 2022
2 parents 71609fd + 6f79acb commit 0336f19
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/AddPlaidBankAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ class AddPlaidBankAccount extends React.Component {
<ActivityIndicator color={themeColors.spinner} size="large" />
</View>
)}
{this.props.plaidData.error && (
{Boolean(this.props.plaidData.error) && (
<Text style={[styles.formError, styles.mh5]}>
{this.props.plaidData.error}
</Text>
)}
{token && (
{Boolean(token) && (
<PlaidLink
token={token}
onSuccess={({publicToken, metadata}) => {
Expand Down Expand Up @@ -217,6 +217,7 @@ export default compose(
},
plaidLinkToken: {
key: ONYXKEYS.PLAID_LINK_TOKEN,
initWithStoredValues: false,
},
}),
)(AddPlaidBankAccount);

0 comments on commit 0336f19

Please sign in to comment.