Skip to content

Commit

Permalink
Fix initialization for index and focus
Browse files Browse the repository at this point in the history
  • Loading branch information
penge committed Feb 15, 2020
1 parent 739a585 commit eda63c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
});

Expand Down

0 comments on commit eda63c7

Please sign in to comment.