copy state before assigning values

otherwise, redux won’t recognize a change in values
This commit is contained in:
Matthew Taylor 2018-01-09 16:44:32 -05:00
parent 080df8673b
commit 380be6b5c1

View file

@ -42,9 +42,11 @@ module.exports.splashReducer = function (state, action) {
switch (action.type) {
case 'SET_ROWS':
state = JSON.parse(JSON.stringify(state));
state[action.rowType].rows = action.rows;
return state;
case 'SET_FETCH_STATUS':
state = JSON.parse(JSON.stringify(state));
state[action.rowType].status = action.status;
return state;
case 'ERROR':