mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-25 20:29:45 -04:00
copy state before assigning values
otherwise, redux won’t recognize a change in values
This commit is contained in:
parent
080df8673b
commit
380be6b5c1
1 changed files with 2 additions and 0 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Reference in a new issue