Commit 73b93ab5 authored by HERBERT Ryan's avatar HERBERT Ryan Committed by Mathieu Giraud
Browse files

js/database.js updateList updateInput clarity

Altered some condition statements to improve clarity of code
parent 5eb9313d
......@@ -898,7 +898,7 @@ Database.prototype = {
that.list.innerHTML = options.filter(function (a) {
if (a == undefined)
return 0
return ~a.toLowerCase().indexOf(value.toLowerCase());
return a.toLowerCase().indexOf(value.toLowerCase()) != -1;
}).slice(0,10).map(function (a) {
return '<option value="' + value + '|' + a + '">' + a + '</option>';
}).join();
......@@ -913,7 +913,7 @@ Database.prototype = {
start = that.selectionStart,
end = that.selectionEnd;
if (~pos) {
if (pos != -1) {
value = value.slice(pos + 1);
}
that.value = value;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment