From b23fb71d1db09ed44f1d8988a97717c7480c6eb0 Mon Sep 17 00:00:00 2001 From: David Cormier Date: Tue, 17 Dec 2013 15:36:54 -0500 Subject: [PATCH] Use strict comparators --- js/irc-utils.js | 6 +++--- js/models.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/irc-utils.js b/js/irc-utils.js index b84eb25..ed0ee10 100644 --- a/js/irc-utils.js +++ b/js/irc-utils.js @@ -33,7 +33,7 @@ var IrcUtils = { var foundNick = null; nickList.some(function(nick) { - if (nick.toLowerCase().search(candidate.toLowerCase()) == 0) { + if (nick.toLowerCase().search(candidate.toLowerCase()) === 0) { // found! foundNick = nick; return true; @@ -62,7 +62,7 @@ var IrcUtils = { // collect matching nicks for (var i = 0; i < nickList.length; ++i) { var lcNick = nickList[i].toLowerCase(); - if (lcNick.search(lcIterCandidate) == 0) { + if (lcNick.search(lcIterCandidate) === 0) { matchingNicks.push(nickList[i]); if (lcCurrentNick == lcNick) { at = matchingNicks.length - 1; @@ -73,7 +73,7 @@ var IrcUtils = { } } - if (at == null || matchingNicks.length == 0) { + if (at === null || matchingNicks.length === 0) { return currentNick; } else { ++at; diff --git a/js/models.js b/js/models.js index 3f922ca..e551d62 100644 --- a/js/models.js +++ b/js/models.js @@ -38,7 +38,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) }; // Buffer opened message does not include notify level - if( message.notify != undefined ) { + if( message.notify !== undefined ) { notify = message.notify; } @@ -244,7 +244,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) } var rtext = ""; - if(content[0] != undefined) { + if(content[0] !== undefined) { rtext = content[0].text; }