diff options
author | Takuya Noguchi <tak.noguchi.iridge@gmail.com> | 2017-02-25 15:43:26 +0300 |
---|---|---|
committer | Takuya Noguchi <tak.noguchi.iridge@gmail.com> | 2017-02-25 17:34:17 +0300 |
commit | 9960c7610ee9bf44f76e4c16c2e49989f0038f99 (patch) | |
tree | dbbaae8068f3b345601cd435334e23dca79a6a5c /app/assets/javascripts/gl_dropdown.js | |
parent | 7d15f36be6cdefcf95a96bf4cbb425baceaf2488 (diff) |
Keep consistent in handling indexOf results
Diffstat (limited to 'app/assets/javascripts/gl_dropdown.js')
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js index a01662e2f9e..9e6ed06054b 100644 --- a/app/assets/javascripts/gl_dropdown.js +++ b/app/assets/javascripts/gl_dropdown.js @@ -63,7 +63,7 @@ } GitLabDropdownFilter.prototype.shouldBlur = function(keyCode) { - return BLUR_KEYCODES.indexOf(keyCode) >= 0; + return BLUR_KEYCODES.indexOf(keyCode) !== -1; }; GitLabDropdownFilter.prototype.filter = function(search_text) { @@ -605,7 +605,7 @@ var occurrences; occurrences = fuzzaldrinPlus.match(text, term); return text.split('').map(function(character, i) { - if (indexOf.call(occurrences, i) >= 0) { + if (indexOf.call(occurrences, i) !== -1) { return "<b>" + character + "</b>"; } else { return character; @@ -748,7 +748,7 @@ return function(e) { var $listItems, PREV_INDEX, currentKeyCode; currentKeyCode = e.which; - if (ARROW_KEY_CODES.indexOf(currentKeyCode) >= 0) { + if (ARROW_KEY_CODES.indexOf(currentKeyCode) !== -1) { e.preventDefault(); e.stopImmediatePropagation(); PREV_INDEX = currentIndex; |