diff options
author | Alexander Tseung <alextsg@users.noreply.github.com> | 2017-10-14 04:34:28 +0800 |
---|---|---|
committer | Daniel Tsui <szehungdanieltsui@gmail.com> | 2017-10-14 04:34:28 +0800 |
commit | b149cceda01318d04195fc2196c29c5d9f67cda0 (patch) | |
tree | 0c99d1090e09be18350eefaeeba5c2724472e53f /ui | |
parent | a84014eff8e008fff6db5ebba7323bb52a2d2d9f (diff) | |
download | tangerine-wallet-browser-b149cceda01318d04195fc2196c29c5d9f67cda0.tar tangerine-wallet-browser-b149cceda01318d04195fc2196c29c5d9f67cda0.tar.gz tangerine-wallet-browser-b149cceda01318d04195fc2196c29c5d9f67cda0.tar.bz2 tangerine-wallet-browser-b149cceda01318d04195fc2196c29c5d9f67cda0.tar.lz tangerine-wallet-browser-b149cceda01318d04195fc2196c29c5d9f67cda0.tar.xz tangerine-wallet-browser-b149cceda01318d04195fc2196c29c5d9f67cda0.tar.zst tangerine-wallet-browser-b149cceda01318d04195fc2196c29c5d9f67cda0.zip |
Fix exception thrown when tokens is null (#2355)
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/token-list.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/app/components/token-list.js b/ui/app/components/token-list.js index fb11be826..4959f1cd5 100644 --- a/ui/app/components/token-list.js +++ b/ui/app/components/token-list.js @@ -141,7 +141,8 @@ TokenList.prototype.componentDidUpdate = function (nextProps) { const sameUserAndNetwork = oldAddress === newAddress && oldNet === newNet const shouldUpdateTokens = isLoading || missingInfo || sameUserAndNetwork - const tokensLengthUnchanged = tokens.length === newTokens.length + const oldTokensLength = tokens ? tokens.length : 0 + const tokensLengthUnchanged = oldTokensLength === newTokens.length if (tokensLengthUnchanged && shouldUpdateTokens) return |