Skip to content

Commit

Permalink
fix: Remove console warning about 'keep' action not being implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
claremacrae committed Aug 7, 2024
1 parent f23d0a4 commit 30e7f0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Task/OnCompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 30e7f0f

Please sign in to comment.