diff --git a/step1-06/demo/src/components/TodoList.tsx b/step1-06/demo/src/components/TodoList.tsx index aeacb25..04987b2 100644 --- a/step1-06/demo/src/components/TodoList.tsx +++ b/step1-06/demo/src/components/TodoList.tsx @@ -3,7 +3,7 @@ import { TodoListItem } from './TodoListItem'; export class TodoList extends React.Component { render() { - const { filter, todos } = this.props; + const { filter, todos = {} } = this.props; // filteredTodos returns an array of filtered todo keys [01,02,03] const filteredTodos = Object.keys(todos).filter(id => {