From 0588da46bfe238350017bffd20c591f33e4a621d Mon Sep 17 00:00:00 2001 From: Kyle Mitchell Date: Sat, 12 Oct 2019 22:34:46 -0400 Subject: [PATCH] fix setting new mode when unset --- js/index.js | 2 +- js/options.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/index.js b/js/index.js index 573b20a..b0c369d 100644 --- a/js/index.js +++ b/js/index.js @@ -34,7 +34,7 @@ function restore_options() { } } else { result.mode = "light" - browser.storage.sync.set(mode) + browser.storage.sync.set({mode:result.mode}) } document.head.appendChild(style) } diff --git a/js/options.js b/js/options.js index 7dff62e..85edb6d 100644 --- a/js/options.js +++ b/js/options.js @@ -45,7 +45,7 @@ function restore_options() { } } else { result.mode = "light" - browser.storage.sync.set(mode) + browser.storage.sync.set({mode:result.mode}) } document.head.appendChild(style) }