Fix storage init and usage

This commit is contained in:
ikipatang 2017-11-26 23:40:29 +01:00
parent b94b88e689
commit ff775a9c7d
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ function openInPopup(url) {
function shareCurrentTab(tab) { function shareCurrentTab(tab) {
const url = tab.url; const url = tab.url;
const title = tab.title || url; const title = tab.title || url;
browser.storage.local.get('url').then((storage) => { browser.storage.local.get().then((storage) => {
if(!storage.url){ if(!storage.url){
browser.runtime.openOptionsPage(); browser.runtime.openOptionsPage();
return; return;

View file

@ -18,7 +18,7 @@ If we don't, then store the default settings.
*/ */
function checkStoredSettings(storedSettings) { function checkStoredSettings(storedSettings) {
if (!storedSettings.storage) { if (!storedSettings.storage) {
browser.storage.local.set({storage}); browser.storage.local.set(storage);
} }
} }