mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
do not modify state object directly
This commit is contained in:
parent
7aa81199ce
commit
d941ec1dff
1 changed files with 1 additions and 2 deletions
|
@ -68,9 +68,8 @@ module.exports.previewReducer = (state, action) => {
|
||||||
return Object.assign({}, state, {curatedStudios: action.items});
|
return Object.assign({}, state, {curatedStudios: action.items});
|
||||||
case 'ADD_PROJECT_TO_STUDIO':
|
case 'ADD_PROJECT_TO_STUDIO':
|
||||||
// add studio id to our studios-that-this-project-belongs-to set.
|
// add studio id to our studios-that-this-project-belongs-to set.
|
||||||
state.currentStudioIds.push(action.studioId);
|
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
currentStudioIds: state.currentStudioIds.slice()
|
currentStudioIds: state.currentStudioIds.concat(action.studioId)
|
||||||
});
|
});
|
||||||
case 'REMOVE_PROJECT_FROM_STUDIO':
|
case 'REMOVE_PROJECT_FROM_STUDIO':
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
|
Loading…
Reference in a new issue