From 5527cf7ed25ece06786e44403ec76bd77318c4f7 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 3 Feb 2020 15:52:02 +1100 Subject: [PATCH] Localise global vars --- js/background.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/background.js b/js/background.js index d971960ec..377494dba 100644 --- a/js/background.js +++ b/js/background.js @@ -922,11 +922,11 @@ // Set user's launch count. const prevLaunchCount = window.getSettingValue('launch-count'); - window.launchCount = !prevLaunchCount ? 1 : prevLaunchCount + 1; - window.setSettingValue('launch-count', window.launchCount); + const launchCount = !prevLaunchCount ? 1 : prevLaunchCount + 1; + window.setSettingValue('launch-count', launchCount); // On first launch - if (window.launchCount === 1) { + if (launchCount === 1) { // Initialise default settings window.setSettingValue('hide-menu-bar', true); window.setSettingValue('link-preview-setting', false);