From 72c846416d31dc7e5a28913928fed8ba1fca9d96 Mon Sep 17 00:00:00 2001 From: SeerLite Date: Mon, 5 Apr 2021 23:42:36 -0400 Subject: [PATCH] Treat null new config as empty localStorage.getItem() returns null for inexistent keys. --- src/js/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/config.js b/src/js/config.js index b10df9c40..c511b50ee 100644 --- a/src/js/config.js +++ b/src/js/config.js @@ -1665,7 +1665,7 @@ export function loadFromLocalStorage() { console.log("loading localStorage config"); // let newConfig = $.cookie("config"); let newConfig = window.localStorage.getItem("config"); - if (newConfig !== undefined && newConfig !== "") { + if (newConfig !== undefined && newConfig !== null && newConfig !== "") { try { newConfig = JSON.parse(newConfig); } catch (e) {