diff options
author | kumavis <aaron@kumavis.me> | 2018-04-07 03:10:39 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2018-04-07 03:10:39 +0800 |
commit | f9a6feb26369048d63cc3794f4f94db4c89ed287 (patch) | |
tree | 1dd2bce03d0ef390b2366a15d47b6e94766c529f /app | |
parent | 6f4dbd6d4a27888ccff88d336ae4340cb69c90e7 (diff) | |
download | tangerine-wallet-browser-f9a6feb26369048d63cc3794f4f94db4c89ed287.tar.gz tangerine-wallet-browser-f9a6feb26369048d63cc3794f4f94db4c89ed287.tar.zst tangerine-wallet-browser-f9a6feb26369048d63cc3794f4f94db4c89ed287.zip |
metamask - never persist if state is missing
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/background.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 837fd7133..5878cd2e8 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -174,8 +174,11 @@ function setupController (initState, initLangCode) { } function persistData(state) { + if (!state) { + throw new Error('MetaMask - updated state is missing', state) + } if (!state.data) { - throw new Error('MetaMask - updated state is missing data', state) + throw new Error('MetaMask - updated state does not have data', state) } if (localStore.isSupported) { localStore.set(state) |