From 0c243e0dc25b9410ed5898d484a63347e296c687 Mon Sep 17 00:00:00 2001 From: Marc Hannappel Date: Wed, 25 Oct 2017 09:12:24 +0200 Subject: [PATCH] Changed a few == to === --- src/octoprint/static/js/app/viewmodels/access.js | 16 ++++++++-------- .../static/js/app/viewmodels/temperature.js | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/octoprint/static/js/app/viewmodels/access.js b/src/octoprint/static/js/app/viewmodels/access.js index 8b563adfe..5f2312c43 100644 --- a/src/octoprint/static/js/app/viewmodels/access.js +++ b/src/octoprint/static/js/app/viewmodels/access.js @@ -60,7 +60,7 @@ $(function() { }); self.editorPasswordMismatch = ko.pureComputed(function() { - return self.editorPassword() != self.editorRepeatedPassword(); + return self.editorPassword() !== self.editorRepeatedPassword(); }); self.requestData = function() { @@ -193,7 +193,7 @@ $(function() { throw OctoPrint.InvalidArgumentError("user must be set"); } - if (user.name == access.loginState.username()) { + if (user.name === access.loginState.username()) { // we do not allow to delete ourselves new PNotify({ title: gettext("Not possible"), @@ -268,7 +268,7 @@ $(function() { // used to delete all the groups before registering new ones self.groupsList.subscribe(function(oldValue) { - if (oldValue === undefined || oldValue.length == 0) + if (oldValue === undefined || oldValue.length === 0) return; oldValue.forEach(function (p) { @@ -332,7 +332,7 @@ $(function() { self.getDefaultGroups = function() { return _.where(self.groupsList(), {defaultOn: true}); - } + }; self.showAddGroupDialog = function() { self.currentGroup(undefined); @@ -444,7 +444,7 @@ $(function() { // used to delete all the permissions before registering new ones self.permissionsList.subscribe(function(oldValue) { - if (oldValue === undefined || oldValue.length == 0) + if (oldValue === undefined || oldValue.length === 0) return; oldValue.forEach(function (p) { @@ -459,7 +459,7 @@ $(function() { newValue.forEach(function(p) { var needs = []; - for (key in p.needs) { + for (var key in p.needs) { p.needs[key].forEach(function(value) { needs.push(self.need(key, value)); }); @@ -474,7 +474,7 @@ $(function() { // used to delete all the permissions before registering new ones self.combinedPermissionsList.subscribe(function(oldValue) { - if (oldValue === undefined || oldValue.length == 0) + if (oldValue === undefined || oldValue.length === 0) return; oldValue.forEach(function (p) { @@ -489,7 +489,7 @@ $(function() { newValue.forEach(function(p) { var needs = []; - for (key in p.needs) { + for (var key in p.needs) { p.needs[key].forEach(function(value) { needs.push(self.need(key, value)); }); diff --git a/src/octoprint/static/js/app/viewmodels/temperature.js b/src/octoprint/static/js/app/viewmodels/temperature.js index 79731fda0..cb0f558df 100644 --- a/src/octoprint/static/js/app/viewmodels/temperature.js +++ b/src/octoprint/static/js/app/viewmodels/temperature.js @@ -729,13 +729,13 @@ $(function() { }; self.handleFocus = function(event, type, item) { - if (type == "target") { + if (type === "target") { var value = item.newTarget(); if (value === undefined || (typeof(value) == "string" && value.trim() == "")) { item.newTarget(item.target()); } event.target.select(); - } else if (type == "offset") { + } else if (type === "offset") { event.target.select(); } };