Make cache clearning error tolerant

feature/default_network_editable
Dan Finlay 8 years ago
parent c3d1404e72
commit 0ea0a9813d
  1. 7
      app/scripts/lib/idStore.js

@ -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…
Cancel
Save