validate meta properly

This commit is contained in:
jacogr 2016-10-22 10:38:48 +02:00
parent 8a60ed1315
commit 82496ae525

View File

@ -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 }>