From ff775a9c7d378d705ba5e5ce0110244a94f9db0e Mon Sep 17 00:00:00 2001 From: ikipatang <5412352+ikipatang@users.noreply.github.com> Date: Sun, 26 Nov 2017 23:40:29 +0100 Subject: [PATCH] Fix storage init and usage --- src/background.js | 2 +- src/storage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/background.js b/src/background.js index 9c61344..e9e3b61 100644 --- a/src/background.js +++ b/src/background.js @@ -20,7 +20,7 @@ function openInPopup(url) { function shareCurrentTab(tab) { const url = tab.url; const title = tab.title || url; - browser.storage.local.get('url').then((storage) => { + browser.storage.local.get().then((storage) => { if(!storage.url){ browser.runtime.openOptionsPage(); return; diff --git a/src/storage.js b/src/storage.js index 20ae517..942fd9b 100644 --- a/src/storage.js +++ b/src/storage.js @@ -18,7 +18,7 @@ If we don't, then store the default settings. */ function checkStoredSettings(storedSettings) { if (!storedSettings.storage) { - browser.storage.local.set({storage}); + browser.storage.local.set(storage); } }