validate meta properly
This commit is contained in:
parent
8a60ed1315
commit
82496ae525
@ -46,7 +46,7 @@ class InputAddress extends Component {
|
||||
const { value, text, accountsInfo, tokens } = this.props;
|
||||
|
||||
const account = accountsInfo[value] || tokens[value];
|
||||
const hasAccount = account && !account.meta.deleted;
|
||||
const hasAccount = account && (!account.meta || !account.meta.deleted);
|
||||
const inputValue = text && hasAccount ? account.name : value;
|
||||
const isEmpty = (!inputValue || inputValue.length === 0);
|
||||
|
||||
@ -74,7 +74,7 @@ class InputAddress extends Component {
|
||||
classes.push(isEmpty ? styles.inputEmpty : styles.input);
|
||||
|
||||
const account = accountsInfo[value] || tokens[value];
|
||||
const hasAccount = account && !account.meta.deleted;
|
||||
const hasAccount = account && (!account.meta || !account.meta.deleted);
|
||||
|
||||
return (
|
||||
<div className={ styles.container }>
|
||||
|
Loading…
Reference in New Issue
Block a user