Fix local storage utils

main
Elbert Alias 2 years ago
parent 78445e62e1
commit c178f72fa3

@ -55,7 +55,7 @@ const Utils = {
*/ */
async getOption(name, defaultValue = null) { async getOption(name, defaultValue = null) {
try { try {
const option = await Utils.promisify(chrome.storage.sync, 'get', name) const option = await chrome.storage.sync.get(name)
if (option[name] !== undefined) { if (option[name] !== undefined) {
return option[name] return option[name]
@ -75,7 +75,7 @@ const Utils = {
*/ */
async setOption(name, value) { async setOption(name, value) {
try { try {
await Utils.promisify(chrome.storage.sync, 'set', { await chrome.storage.sync.set({
[name]: value, [name]: value,
}) })
} catch (error) { } catch (error) {