diff options
author | Ellie Day <heyellieday@gmail.com> | 2018-01-03 13:31:17 +0800 |
---|---|---|
committer | Ellie Day <heyellieday@gmail.com> | 2018-01-03 13:31:17 +0800 |
commit | 7184db7632ef79d4bde0e643fdc1a4ee910c77fb (patch) | |
tree | a634f4a92faf8aa84f061eb286b1bd656c45c84f /app/scripts/background.js | |
parent | a76324f6d397c3e746ba501cfd858c4869cb0af7 (diff) | |
download | tangerine-wallet-browser-7184db7632ef79d4bde0e643fdc1a4ee910c77fb.tar tangerine-wallet-browser-7184db7632ef79d4bde0e643fdc1a4ee910c77fb.tar.gz tangerine-wallet-browser-7184db7632ef79d4bde0e643fdc1a4ee910c77fb.tar.bz2 tangerine-wallet-browser-7184db7632ef79d4bde0e643fdc1a4ee910c77fb.tar.lz tangerine-wallet-browser-7184db7632ef79d4bde0e643fdc1a4ee910c77fb.tar.xz tangerine-wallet-browser-7184db7632ef79d4bde0e643fdc1a4ee910c77fb.tar.zst tangerine-wallet-browser-7184db7632ef79d4bde0e643fdc1a4ee910c77fb.zip |
handle situation where storage.sync is disabled in certain versions of firefox
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r-- | app/scripts/background.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 45da2f6d0..732f47590 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -47,11 +47,10 @@ async function initialize () { async function loadStateFromPersistence () { // migrations const migrator = new Migrator({ migrations }) - // fetch from extension store - const extensionData = await extensionStore.fetch() // TODO: handle possible exceptions (https://developer.chrome.com/apps/runtime#property-lastError) // read from disk let versionedData = diskStore.getState() || migrator.generateInitialState(firstTimeState) - // merge extension and versioned data + // fetch from extension store and merge in data + const extensionData = await extensionStore.fetch() // TODO: handle possible exceptions (https://developer.chrome.com/apps/runtime#property-lastError) versionedData = { ...versionedData, ...extensionData } // migrate data versionedData = await migrator.migrateData(versionedData) |