Fix storage init and usage
This commit is contained in:
parent
b94b88e689
commit
ff775a9c7d
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue