From 30e7f0ff4ff7506de4418364f692832ed112b341 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Wed, 7 Aug 2024 23:06:50 +0100 Subject: [PATCH] fix: Remove console warning about 'keep' action not being implemented --- src/Task/OnCompletion.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Task/OnCompletion.ts b/src/Task/OnCompletion.ts index 659d6d28e4..a2c1e92cc6 100644 --- a/src/Task/OnCompletion.ts +++ b/src/Task/OnCompletion.ts @@ -34,7 +34,11 @@ function keepTasks(originalTask: Task, changedStatusTask: Task) { export function handleOnCompletion(originalTask: Task, newTasks: Task[]): Task[] { const tasksArrayLength = newTasks.length; - if (originalTask.onCompletion === OnCompletion.Ignore || tasksArrayLength === 0) { + if ( + originalTask.onCompletion === OnCompletion.Ignore || + originalTask.onCompletion === OnCompletion.Keep || + tasksArrayLength === 0 + ) { return newTasks; } const changedStatusTask = newTasks[tasksArrayLength - 1];