aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-09-13 06:26:07 +0800
committerDan Finlay <dan@danfinlay.com>2016-09-13 06:26:07 +0800
commit0ea0a9813d1e33613d19a6a74f8966a6e8f4a2ac (patch)
treed8b9e4d13ced444c81012da1b3e45a19a15a2f7a /app
parentc3d1404e72f4978db5b4522cb793ffd22653d9ff (diff)
downloadtangerine-wallet-browser-0ea0a9813d1e33613d19a6a74f8966a6e8f4a2ac.tar
tangerine-wallet-browser-0ea0a9813d1e33613d19a6a74f8966a6e8f4a2ac.tar.gz
tangerine-wallet-browser-0ea0a9813d1e33613d19a6a74f8966a6e8f4a2ac.tar.bz2
tangerine-wallet-browser-0ea0a9813d1e33613d19a6a74f8966a6e8f4a2ac.tar.lz
tangerine-wallet-browser-0ea0a9813d1e33613d19a6a74f8966a6e8f4a2ac.tar.xz
tangerine-wallet-browser-0ea0a9813d1e33613d19a6a74f8966a6e8f4a2ac.tar.zst
tangerine-wallet-browser-0ea0a9813d1e33613d19a6a74f8966a6e8f4a2ac.zip
Make cache clearning error tolerant
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/idStore.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index e84e1aba0..b5b13a57a 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -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)
})