From 29e4d677f380aeb620a0a187b852c8a0e9b828cb Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Mon, 5 Sep 2022 16:40:08 +0000 Subject: [PATCH] Replace `==`/`!=` with `===`/`!==` --- js/dms.js | 2 +- routes/api/all.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/dms.js b/js/dms.js index c615ee0..53fc0fd 100644 --- a/js/dms.js +++ b/js/dms.js @@ -379,7 +379,7 @@ function switchChannel(channelname) { sessionStorage.setItem("lastdm", channelname); currentChannel = channelname - if(localStorage.getItem(currentChannel+"enc_key")!=null) { + if(localStorage.getItem(currentChannel+"enc_key")!==null) { encryption_keys = localStorage.getItem(currentChannel+"enc_key") } else { encryption_keys = "" diff --git a/routes/api/all.js b/routes/api/all.js index 459380d..43bfa94 100644 --- a/routes/api/all.js +++ b/routes/api/all.js @@ -41,7 +41,7 @@ export const setup = function (router, con, server) { res.locals.settings = JSON.parse(result[0].User_Settings); if (res.locals.settings == "null") res.locals.settings = {}; - if (res.locals.settings == null) + if (res.locals.settings === null) res.locals.settings = {}; }