From da4c8bd2b8efbd8b0db274719d459ed0e8c7a51c Mon Sep 17 00:00:00 2001 From: didierfred <didierfred@gmail.com> Date: Sun, 9 Dec 2018 21:24:51 +0100 Subject: [PATCH] correct bug in load config --- background.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/background.js b/background.js index 91307cf..1ddeacb 100644 --- a/background.js +++ b/background.js @@ -15,11 +15,13 @@ let started = 'off'; let debug_mode = false; loadFromBrowserStorage(['config','started'],function(result) { - config = result.config; - - // if old storage method - if (config===undefined) loadConfigurationFromLocalStorage(); - else started = result.started; + + // if old storage method + if (result.config===undefined) loadConfigurationFromLocalStorage(); + else { + started = result.started; + config = JSON.parse(result.config); + } if (started==='on') { addListener(); -- GitLab