Skip to content

Commit 326b817

Browse files
committed
allow previous edits
1 parent f8dc1a3 commit 326b817

File tree

1 file changed

+4
-2
lines changed
  • packages/compass-data-modeling/src/store

1 file changed

+4
-2
lines changed

packages/compass-data-modeling/src/store/diagram.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,13 @@ export const diagramReducer: Reducer<DiagramState> = (
9494
action
9595
) => {
9696
if (isAction(action, DiagramActionTypes.OPEN_DIAGRAM)) {
97+
const current = action.diagram.edits;
98+
const prev = current.map((_item, index, arr) => arr.slice(0, index + 1));
9799
return {
98100
...action.diagram,
99101
edits: {
100-
prev: [],
101-
current: action.diagram.edits,
102+
prev,
103+
current,
102104
next: [],
103105
},
104106
};

0 commit comments

Comments
 (0)