diff options
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/js/util.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index f9b221b3..d9bd76c5 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -210,15 +210,7 @@ function optionsLoad() { return new Promise((resolve, reject) => { chrome.storage.local.get(null, store => resolve(store.options)); }).then(optionsStr => { - if (optionsStr) { - return JSON.parse(optionsStr); - } else if (chrome.storage.sync) { - return new Promise((resolve, reject) => { - chrome.storage.sync.get(null, options => resolve(options)); - }); - } else { - return {}; - } + return optionsStr ? JSON.parse(optionsStr) : {}; }).catch(error => { return {}; }).then(options => { |