Skip to content

Commit 0ea0a98

Browse files
committed
Make cache clearning error tolerant
1 parent c3d1404 commit 0ea0a98

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/scripts/lib/idStore.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,12 @@ IdentityStore.prototype._createIdMgmt = function (derivedKey) {
503503

504504
IdentityStore.prototype.purgeCache = function () {
505505
this._currentState.identities = {}
506-
var accounts = Object.keys(this._ethStore._currentState.accounts)
506+
let accounts
507+
try {
508+
Object.keys(this._ethStore._currentState.accounts)
509+
} catch (e) {
510+
accounts = []
511+
}
507512
accounts.forEach((address) => {
508513
this._ethStore.removeAccount(address)
509514
})

0 commit comments

Comments
 (0)