mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
metamask - never persist if state is missing
This commit is contained in:
parent
6f4dbd6d4a
commit
f9a6feb263
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user