regex -> indexOf
This commit is contained in:
+1
-1
@@ -365,7 +365,7 @@
|
|||||||
|
|
||||||
queries
|
queries
|
||||||
.filter(function(query) {
|
.filter(function(query) {
|
||||||
var matchesQuery = query[0].match(new RegExp(input));
|
var matchesQuery = query[0].indexOf(input) !== -1;
|
||||||
return input && matchesQuery && input !== query[0];
|
return input && matchesQuery && input !== query[0];
|
||||||
})
|
})
|
||||||
.slice(0, config.suggestionsLimit).forEach(function(query) {
|
.slice(0, config.suggestionsLimit).forEach(function(query) {
|
||||||
|
|||||||
Reference in New Issue
Block a user