Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

todo app remaining tasks reducer func fixed and clarified #1050

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/docs/_examples/homepage-todo/ts/app/todo_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class TodoApp {
];

get remaining() {
return this.todos.reduce((count: number, todo: Todo) => count + +!todo.done, 0);
return this.todos.filter((todo: Todo) => !todo.done).length;
}

archive(): void {
Expand Down