remove references to chrome.storage.sync

This commit is contained in:
Alex Yatskov 2017-03-11 18:39:01 -08:00
parent 73fcc5a957
commit e8a993bf35

View File

@ -210,15 +210,7 @@ function optionsLoad() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
chrome.storage.local.get(null, store => resolve(store.options)); chrome.storage.local.get(null, store => resolve(store.options));
}).then(optionsStr => { }).then(optionsStr => {
if (optionsStr) { return optionsStr ? JSON.parse(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 {};
}
}).catch(error => { }).catch(error => {
return {}; return {};
}).then(options => { }).then(options => {