1
0
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:
Dan Finlay 2016-09-12 15:26:07 -07:00
parent c3d1404e72
commit 0ea0a9813d

View File

@ -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)
})