diff --git a/Chapter 02/todo/src/index.ts b/Chapter 02/todo/src/index.ts index 2fb9c28..78b8a95 100644 --- a/Chapter 02/todo/src/index.ts +++ b/Chapter 02/todo/src/index.ts @@ -43,7 +43,7 @@ function promptComplete(): void { ({name: item.task, value: item.id, checked: item.complete})) }).then(answers => { let completedTasks = answers["complete"] as number[]; - collection.getTodoItems(true).forEach(item => + collection.getTodoItems(showCompleted).forEach(item => collection.markComplete(item.id, completedTasks.find(id => id === item.id) != undefined)); promptUser();