Skip to content

Commit c055dc3

Browse files
committed
Reset error state when fetching todos from server.
1 parent d09f6eb commit c055dc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/reducers/todo_list.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def todo_list_reducer(state=initial_state, action=None):
2020
if type_ == FETCH_ALL_TODOS_PENDING:
2121
return Object.assign({}, state, {
2222
"loading": True,
23-
"todos": []
23+
"todos": [],
24+
"error": None
2425
})
2526

2627
elif type_ in (ADD_NEW_TODO_REJECTED, COMPLETE_TODO_REJECTED,

0 commit comments

Comments
 (0)