Skip to content

Commit cb64e79

Browse files
committed
fixes
1 parent 6fe87ff commit cb64e79

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/graph-builder/graph-core/1-core.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ class CoreGraph {
8686
}
8787

8888
set({
89-
cy, dispatcher, superState, projectName,
89+
cy, dispatcher, superState, projectName, authorName,
9090
}) {
9191
if (dispatcher) this.dispatcher = dispatcher;
9292
if (superState) this.superState = superState;
9393
if (cy) this.cy = cy;
9494
if (projectName) this.projectName = projectName;
95+
if (authorName) this.authorName = authorName;
9596
}
9697

9798
setProjectName(projectName, shouldEmit = true) {

src/graph-builder/graph-core/4-undo-redo.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,17 @@ class GraphUndoRedo extends GraphComponent {
8383
return r;
8484
}
8585

86-
addAction(inverse, equivalent, tid, authorName = this.superState.authorName) {
86+
addAction(inverse, equivalent, tid) {
8787
if (tid === 0) return;
8888
this.actionArr.splice(this.curActionIndex);
8989

9090
const actionIdentity = GraphUndoRedo.sequencify(equivalent).toString()
9191
+ GraphUndoRedo.sequencify(equivalent).toString()
92-
+ tid
93-
+ authorName;
92+
+ tid;
9493
this.actionArr.push({
9594
tid,
9695
inverse,
9796
equivalent,
98-
authorName,
9997
hash: md5(
10098
`${actionIdentity}|${this.actionArr.length ? this.actionArr.at(-1).hash : ''}`,
10199
),

0 commit comments

Comments
 (0)