Use strict comparators
This commit is contained in:
parent
e2a84470ce
commit
b23fb71d1d
|
@ -33,7 +33,7 @@ var IrcUtils = {
|
||||||
var foundNick = null;
|
var foundNick = null;
|
||||||
|
|
||||||
nickList.some(function(nick) {
|
nickList.some(function(nick) {
|
||||||
if (nick.toLowerCase().search(candidate.toLowerCase()) == 0) {
|
if (nick.toLowerCase().search(candidate.toLowerCase()) === 0) {
|
||||||
// found!
|
// found!
|
||||||
foundNick = nick;
|
foundNick = nick;
|
||||||
return true;
|
return true;
|
||||||
|
@ -62,7 +62,7 @@ var IrcUtils = {
|
||||||
// collect matching nicks
|
// collect matching nicks
|
||||||
for (var i = 0; i < nickList.length; ++i) {
|
for (var i = 0; i < nickList.length; ++i) {
|
||||||
var lcNick = nickList[i].toLowerCase();
|
var lcNick = nickList[i].toLowerCase();
|
||||||
if (lcNick.search(lcIterCandidate) == 0) {
|
if (lcNick.search(lcIterCandidate) === 0) {
|
||||||
matchingNicks.push(nickList[i]);
|
matchingNicks.push(nickList[i]);
|
||||||
if (lcCurrentNick == lcNick) {
|
if (lcCurrentNick == lcNick) {
|
||||||
at = matchingNicks.length - 1;
|
at = matchingNicks.length - 1;
|
||||||
|
@ -73,7 +73,7 @@ var IrcUtils = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (at == null || matchingNicks.length == 0) {
|
if (at === null || matchingNicks.length === 0) {
|
||||||
return currentNick;
|
return currentNick;
|
||||||
} else {
|
} else {
|
||||||
++at;
|
++at;
|
||||||
|
|
|
@ -38,7 +38,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Buffer opened message does not include notify level
|
// Buffer opened message does not include notify level
|
||||||
if( message.notify != undefined ) {
|
if( message.notify !== undefined ) {
|
||||||
notify = message.notify;
|
notify = message.notify;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
var rtext = "";
|
var rtext = "";
|
||||||
if(content[0] != undefined) {
|
if(content[0] !== undefined) {
|
||||||
rtext = content[0].text;
|
rtext = content[0].text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue