From 8fa530149fcd6717b5ffdb21f34eb8526a232a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Sat, 2 Nov 2019 21:00:19 +0100 Subject: [PATCH] =?UTF-8?q?Only=20match=20uncompleted=20tasks=20Signed-off?= =?UTF-8?q?-by:=20Raimund=20Schl=C3=BC=C3=9Fler=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/storeHelper.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/store/storeHelper.js b/src/store/storeHelper.js index 97521e4f..9b814497 100644 --- a/src/store/storeHelper.js +++ b/src/store/storeHelper.js @@ -59,15 +59,12 @@ function isTaskInList(task, listId, checkSubtasks = true) { * @returns {Boolean} */ function testTask(task, testFunction, checkSubtasks = false) { - if (testFunction(task)) { + if (!task.completed && testFunction(task)) { return true } if (checkSubtasks) { for (var key in task.subTasks) { var subTask = task.subTasks[key] - if (testFunction(subTask)) { - return true - } if (testTask(subTask, testFunction, checkSubtasks)) { return true }