mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Make cache clearning error tolerant
This commit is contained in:
parent
c3d1404e72
commit
0ea0a9813d
@ -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)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user