Skip to content

Commit

Permalink
Merge pull request #652 from zerodat/filter_toString_fix
Browse files Browse the repository at this point in the history
solves filter bug due to todoObject.toString, issue #647
  • Loading branch information
zerodat authored Jan 28, 2024
2 parents 7d5d600 + 9f438da commit fcf9a4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/modules/Filters/FilterQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ function runQuery(todoObject, compiledQuery) {
break;
case "string":
next = q.shift(); // the string value to match
stack.push(todoObject.toString().toLowerCase().indexOf(next.toLowerCase()) !== -1);
stack.push(todoObject.string.toLowerCase().indexOf(next.toLowerCase()) !== -1);
break;
case "regex":
next = q.shift(); // the regex to match
stack.push(next.test(todoObject.toString()));
stack.push(next.test(todoObject.string));
break;
case "==":
operand2 = stack.pop();
Expand Down

0 comments on commit fcf9a4c

Please sign in to comment.