From 335314aec6843511dc0f53ba73518df7910e6d9a Mon Sep 17 00:00:00 2001 From: huoteng Date: Thu, 8 Dec 2022 13:34:04 +0800 Subject: [PATCH] fix(history): do not record unchanged data --- packages/designer/src/document/history.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/designer/src/document/history.ts b/packages/designer/src/document/history.ts index 96a1e40f7..eaac946b1 100644 --- a/packages/designer/src/document/history.ts +++ b/packages/designer/src/document/history.ts @@ -41,6 +41,12 @@ export class History { if (this.asleep) return; untracked(() => { const log = this.currentSerialization.serialize(data); + + // do not record unchanged data + if (this.session.data === log) { + return; + } + if (this.session.isActive()) { this.session.log(log); } else {