Skip to content

Commit 73a098c

Browse files
committed
changing state iteration to state.projects
1 parent 71e272e commit 73a098c

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
@@ -15,12 +15,17 @@ const sketches = (state = [], action) => {
1515
});
1616
}
1717
case ActionTypes.RENAME_PROJECT: {
18-
return state.map((sketch) => {
18+
const updatedproject = state.projects.map((sketch) => {
1919
if (sketch.id === action.payload.id) {
2020
return { ...sketch, name: action.payload.name };
2121
}
2222
return sketch;
2323
});
24+
25+
return {
26+
...state,
27+
projects: updatedproject
28+
};
2429
}
2530
default:
2631
return state;

0 commit comments

Comments
 (0)