Skip to content

Commit

Permalink
Improved search functionality. Fixes #126
Browse files Browse the repository at this point in the history
  • Loading branch information
klaudiosinani committed Feb 11, 2019
1 parent a486bc5 commit 97eb4ec
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/taskbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,11 @@ class Taskbook {
}

_hasTerms(string, terms) {
let result;

terms.forEach((term, key, arr) => {
for (const term of terms) {
if (string.toLocaleLowerCase().indexOf(term.toLocaleLowerCase()) > -1) {
result = (key === arr.length - 1) ? string : '';
return string;
}
});

return result;
}
}

_filterTask(data) {
Expand Down

0 comments on commit 97eb4ec

Please sign in to comment.