From eda63c7f622575d44974ca04ef7d1519cdf4f7ea Mon Sep 17 00:00:00 2001 From: penge Date: Sat, 15 Feb 2020 10:44:39 +0700 Subject: [PATCH] Fix initialization for index and focus --- background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/background.js b/background.js index b051d5c9..5d528d22 100644 --- a/background.js +++ b/background.js @@ -70,11 +70,11 @@ chrome.runtime.onInstalled.addListener(() => { chrome.storage.local.get(["index", "font", "size", "mode", "focus"], local => { chrome.storage.local.set({ - index: (local.index !== "undefined" ? local.index : defaultIndex), + index: (typeof local.index !== "undefined" ? local.index : defaultIndex), font: (local.font || defaultFont), size: (local.size || defaultSize), mode: (local.mode || defaultMode), - focus: (local.focus !== "undefined" ? local.focus : defaultFocus), + focus: (typeof local.focus !== "undefined" ? local.focus : defaultFocus), }); });