mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 20:39:08 +01:00
Fix exception thrown when tokens is null (#2355)
This commit is contained in:
parent
a84014eff8
commit
b149cceda0
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user