1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

metamask - never persist if state is missing

This commit is contained in:
kumavis 2018-04-06 12:10:39 -07:00
parent 6f4dbd6d4a
commit f9a6feb263

View File

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