diff options
Make cache clearning error tolerant
Diffstat (limited to 'app/scripts/lib/idStore.js')
-rw-r--r-- | app/scripts/lib/idStore.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index e84e1aba0..b5b13a57a 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -503,7 +503,12 @@ IdentityStore.prototype._createIdMgmt = function (derivedKey) { IdentityStore.prototype.purgeCache = function () { this._currentState.identities = {} - var accounts = Object.keys(this._ethStore._currentState.accounts) + let accounts + try { + Object.keys(this._ethStore._currentState.accounts) + } catch (e) { + accounts = [] + } accounts.forEach((address) => { this._ethStore.removeAccount(address) }) |