Skip to content

Commit 225222b

Browse files
authored
Merge pull request #3927 from Jatin24062005/fixing_renaming_live_reload
Fixing Sketches list does not update after renaming a sketch
2 parents 5ec16c8 + 313fbe0 commit 225222b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

client/modules/IDE/reducers/projects.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,17 @@ const sketches = (state = [], action) => {
2020
}
2121

2222
case ActionTypes.RENAME_PROJECT: {
23-
return state.map((sketch) => {
23+
const updatedproject = state.projects.map((sketch) => {
2424
if (sketch.id === action.payload.id) {
2525
return { ...sketch, name: action.payload.name };
2626
}
2727
return sketch;
2828
});
29+
30+
return {
31+
...state,
32+
projects: updatedproject
33+
};
2934
}
3035
default:
3136
return state;

0 commit comments

Comments
 (0)