fix(history): do not record unchanged data

This commit is contained in:
huoteng 2022-12-08 13:34:04 +08:00 committed by 刘菊萍(絮黎)
parent 5de97c10c8
commit 335314aec6

View File

@ -41,6 +41,12 @@ export class History<T = NodeSchema> {
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 {