From c836e8fbbe1232ccda7fcdd50da7e23e6ac8e02a Mon Sep 17 00:00:00 2001 From: Thomas Rientjes <synzvato@protonmail.com> Date: Wed, 21 Feb 2018 12:03:36 -0300 Subject: [PATCH] Fix #253 by correcting initialization logic --- core/state-manager.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/state-manager.js b/core/state-manager.js index dddc747..8d4db71 100644 --- a/core/state-manager.js +++ b/core/state-manager.js @@ -192,7 +192,12 @@ chrome.tabs.query({}, function (tabs) { }); chrome.storage.local.get(Setting.SHOW_ICON_BADGE, function (items) { - stateManager.showIconBadge = items.showIconBadge || true; + + if (items.showIconBadge === undefined) { + items.showIconBadge = true; + } + + stateManager.showIconBadge = items.showIconBadge; }); /** -- GitLab