Make the function search to look for the prefix

This commit is contained in:
Andrea Cardaci 2018-09-15 20:13:33 +02:00
parent 7d7bc72364
commit 86e7f282e0

View File

@ -61,7 +61,7 @@
// check against the pattern // check against the pattern
var noMatches = true; var noMatches = true;
functionElems.forEach((item) => { functionElems.forEach((item) => {
if (item.innerText.toLowerCase().indexOf(pattern) !== -1) { if (item.innerText.toLowerCase().startsWith(pattern.toLowerCase())) {
item.className = 'match'; item.className = 'match';
noMatches = false; noMatches = false;
} }