mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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 () {
|
IdentityStore.prototype.purgeCache = function () {
|
||||||
this._currentState.identities = {}
|
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) => {
|
accounts.forEach((address) => {
|
||||||
this._ethStore.removeAccount(address)
|
this._ethStore.removeAccount(address)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user