Settings.get fix for chrome and edge

This commit is contained in:
Tamius Han 2019-05-09 23:41:07 +02:00
parent 6bb4e97f64
commit 358863e7ef

View File

@ -127,15 +127,15 @@ class Settings {
return undefined;
}
} else if (currentBrowser.chrome) {
const ret = new Promise( (resolve, reject) => {
const ret = await new Promise( (resolve, reject) => {
chrome.storage.local.get('uwSettings', (res) => resolve(res));
});
return ret['uwSettings'];
return JSON.parse(ret['uwSettings']);
} else if (currentBrowser.edge) {
const ret = new Promise( (resolve, reject) => {
const ret = await new Promise( (resolve, reject) => {
browser.storage.local.get('uwSettings', (res) => resolve(res));
});
return ret['uwSettings'];
return JSON.parse(ret['uwSettings']);
}
}