From 9f438da3b5cf8958dc69a5e5b606d4b3dc3cc454 Mon Sep 17 00:00:00 2001 From: zerodat <81216634+zerodat@users.noreply.github.com> Date: Sun, 28 Jan 2024 13:46:01 -0800 Subject: [PATCH] solves filter bug due to todoObject.toString, issue #647 --- src/main/modules/Filters/FilterQuery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/modules/Filters/FilterQuery.js b/src/main/modules/Filters/FilterQuery.js index 35efb95d..59b4596b 100644 --- a/src/main/modules/Filters/FilterQuery.js +++ b/src/main/modules/Filters/FilterQuery.js @@ -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();