Skip to content

Commit 80239df

Browse files
authored
Merge branch 'ControlCore-Project:main' into author_fix
2 parents da7c74d + 323e8ee commit 80239df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/reducer/reducer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ const reducer = (state, action) => {
142142

143143
case T.SET_FILE_HANDLE: {
144144
const newState = { ...state };
145-
newState.graphs = newState.graphs.map((g) => (
146-
newState.curGraphIndex === action.payload.curGraphIndex ? { ...g, fileHandle: action.payload.fileHandle }
145+
newState.graphs = newState.graphs.map((g, index) => (
146+
index === action.payload.curGraphIndex ? { ...g, fileHandle: action.payload.fileHandle }
147147
: g
148148
));
149149
return { ...newState };

0 commit comments

Comments
 (0)