From c4e37bf47d732f914741c8ea381e9c3d2b35c70e Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 6 Feb 2017 16:49:37 +1300 Subject: [PATCH] explicit falsey checks for some persistent vars (no practical difference) --- client/dcwebui.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/dcwebui.js b/client/dcwebui.js index 9a48d5d..ccc25c4 100644 --- a/client/dcwebui.js +++ b/client/dcwebui.js @@ -365,7 +365,7 @@ var submit = function() { } if (hub_pass === SENTINEL_PASSWORD) { // Probably not a real password. Attempt to load a better one from the saved state - var cache = persistence_get("login"); + var cache = persistence_get("login", ""); if (cache.indexOf(":") != -1) { hub_pass = cache.substr(cache.indexOf(":") + 1); } @@ -1009,9 +1009,9 @@ window.onload = function() { timestamp_format_index = persistence_get("timestamps", 0); - should_warn_on_close = persistence_get("warnonclose"); + should_warn_on_close = persistence_get("warnonclose", false); - desktop_notifications_enabled = persistence_get("popups"); + desktop_notifications_enabled = persistence_get("popups", false); if (desktop_notifications_enabled) { // prompt for permissions desktop_notifications_onEnable();