minor readme tweaks

This commit is contained in:
Micah Godbolt
2019-02-27 20:25:28 -08:00
parent 3d69b2846d
commit 35eea2e60d
16 changed files with 62 additions and 42 deletions

View File

@@ -3,7 +3,7 @@ import { TodoListItem } from './TodoListItem';
export class TodoList extends React.Component<any, any> {
render() {
const { filter, todos } = this.props;
const { filter, todos = [] } = this.props;
const filteredTodos = Object.keys(todos).filter(id => {
return filter === 'all' || (filter === 'completed' && todos[id].completed) || (filter === 'active' && !todos[id].completed);