Skip to content
Snippets Groups Projects
Commit a985b17c authored by Dirk Doesburg's avatar Dirk Doesburg
Browse files

fix TypeError

parent 597ce704
No related branches found
No related tags found
1 merge request!398"Search for Calendar events"
......@@ -7,11 +7,11 @@ const initialState = {
keywords: undefined,
};
export default function calendar(state = initialState, { type, payload }) {
switch (type) {
export default function calendar(state = initialState, action = {}) {
switch (action.type) {
case calendarActions.SUCCESS:
return {
eventList: payload.eventList,
eventList: action.payload.eventList,
loading: false,
status: 'success',
};
......@@ -25,7 +25,7 @@ export default function calendar(state = initialState, { type, payload }) {
return {
...state,
loading: true,
keywords: payload.keywords,
keywords: action.payload.keywords,
};
default:
return state;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment