mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Fix some == with ===
This commit is contained in:
parent
99b4c43fd5
commit
5d39d85215
@ -89,7 +89,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
child.on("close", (code) => {
|
child.on("close", (code) => {
|
||||||
if (code != 0) {
|
if (code !== 0) {
|
||||||
console.log(`There something wrong. The clientonly is not running code ${code}`);
|
console.log(`There something wrong. The clientonly is not running code ${code}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -66,7 +66,7 @@ var App = function() {
|
|||||||
var config = Object.assign(defaults, c);
|
var config = Object.assign(defaults, c);
|
||||||
callback(config);
|
callback(config);
|
||||||
} catch (e) {
|
} 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."));
|
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) {
|
} 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));
|
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));
|
||||||
|
@ -328,7 +328,7 @@ var MM = (function() {
|
|||||||
|
|
||||||
var showWrapper = false;
|
var showWrapper = false;
|
||||||
Array.prototype.forEach.call(moduleWrappers, function(moduleWrapper) {
|
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;
|
showWrapper = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -26,7 +26,7 @@ var Server = function(config, callback) {
|
|||||||
|
|
||||||
server.listen(port, config.address ? config.address : null);
|
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"))
|
console.info(Utils.colors.warn("You're using a full whitelist configuration to allow for all IPs"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ var Translator = (function() {
|
|||||||
xhr.overrideMimeType("application/json");
|
xhr.overrideMimeType("application/json");
|
||||||
xhr.open("GET", file, true);
|
xhr.open("GET", file, true);
|
||||||
xhr.onreadystatechange = function () {
|
xhr.onreadystatechange = function () {
|
||||||
if (xhr.readyState == 4 && xhr.status == "200") {
|
if (xhr.readyState === 4 && xhr.status === "200") {
|
||||||
callback(JSON.parse(stripComments(xhr.responseText)));
|
callback(JSON.parse(stripComments(xhr.responseText)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user