Skip to content

Commit 335314a

Browse files
huotengliujuping
authored andcommitted
fix(history): do not record unchanged data
1 parent 5de97c1 commit 335314a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/designer/src/document/history.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ export class History<T = NodeSchema> {
4141
if (this.asleep) return;
4242
untracked(() => {
4343
const log = this.currentSerialization.serialize(data);
44+
45+
// do not record unchanged data
46+
if (this.session.data === log) {
47+
return;
48+
}
49+
4450
if (this.session.isActive()) {
4551
this.session.log(log);
4652
} else {

0 commit comments

Comments
 (0)