From 5d39d8521575c30b203380d977a71e7590a524ba Mon Sep 17 00:00:00 2001 From: rejas Date: Tue, 4 Jun 2019 09:51:51 +0200 Subject: [PATCH] Fix some == with === --- clientonly/index.js | 2 +- js/app.js | 2 +- js/main.js | 2 +- js/server.js | 2 +- js/translator.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clientonly/index.js b/clientonly/index.js index 30288d37..63ac0ea0 100644 --- a/clientonly/index.js +++ b/clientonly/index.js @@ -89,7 +89,7 @@ }); child.on("close", (code) => { - if (code != 0) { + if (code !== 0) { console.log(`There something wrong. The clientonly is not running code ${code}`); } }); diff --git a/js/app.js b/js/app.js index b75b9829..c059bef6 100644 --- a/js/app.js +++ b/js/app.js @@ -66,7 +66,7 @@ var App = function() { var config = Object.assign(defaults, c); callback(config); } catch (e) { - if (e.code == "ENOENT") { + if (e.code === "ENOENT") { console.error(Utils.colors.error("WARNING! Could not find config file. Please create one. Starting with default configuration.")); } else if (e instanceof ReferenceError || e instanceof SyntaxError) { console.error(Utils.colors.error("WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: " + e.stack)); diff --git a/js/main.js b/js/main.js index b3173306..f16f384b 100644 --- a/js/main.js +++ b/js/main.js @@ -328,7 +328,7 @@ var MM = (function() { var showWrapper = false; Array.prototype.forEach.call(moduleWrappers, function(moduleWrapper) { - if (moduleWrapper.style.position == "" || moduleWrapper.style.position == "static") { + if (moduleWrapper.style.position === "" || moduleWrapper.style.position === "static") { showWrapper = true; } }); diff --git a/js/server.js b/js/server.js index fbc51cbc..ec899216 100644 --- a/js/server.js +++ b/js/server.js @@ -26,7 +26,7 @@ var Server = function(config, callback) { server.listen(port, config.address ? config.address : null); - if (config.ipWhitelist instanceof Array && config.ipWhitelist.length == 0) { + if (config.ipWhitelist instanceof Array && config.ipWhitelist.length === 0) { console.info(Utils.colors.warn("You're using a full whitelist configuration to allow for all IPs")) } diff --git a/js/translator.js b/js/translator.js index 6891802d..45c5b23d 100644 --- a/js/translator.js +++ b/js/translator.js @@ -18,7 +18,7 @@ var Translator = (function() { xhr.overrideMimeType("application/json"); xhr.open("GET", file, true); xhr.onreadystatechange = function () { - if (xhr.readyState == 4 && xhr.status == "200") { + if (xhr.readyState === 4 && xhr.status === "200") { callback(JSON.parse(stripComments(xhr.responseText))); } };