Index: lib/matcher.js |
=================================================================== |
--- a/lib/matcher.js |
+++ b/lib/matcher.js |
@@ -399,17 +399,17 @@ |
let candidates = pattern.toLowerCase().match(allKeywordsRegExp); |
if (!candidates) |
return result; |
let resultCount = 0xFFFFFF; |
let resultLength = 0; |
for (let i = 0, l = candidates.length; i < l; i++) |
{ |
- let candidate = candidates[i].substr(1); |
+ let candidate = candidates[i].substring(1); |
let simpleFilters = this._simpleFiltersByKeyword.get(candidate); |
let complexFilters = this._complexFiltersByKeyword.get(candidate); |
let count = (typeof simpleFilters != "undefined" ? |
simpleFilters.size : 0) + |
(typeof complexFilters != "undefined" ? |
complexFilters.size : 0); |
if (count < resultCount || |
(count == resultCount && candidate.length > resultLength)) |