diff --git a/simple-mind-map/src/core/command/Command.js b/simple-mind-map/src/core/command/Command.js index eddc24d2..730cba52 100644 --- a/simple-mind-map/src/core/command/Command.js +++ b/simple-mind-map/src/core/command/Command.js @@ -104,7 +104,7 @@ class Command { return } const lastData = - this.history.length > 0 ? this.history[this.history.length - 1] : null + this.history.length > 0 ? this.history[this.activeHistoryIndex] : null const data = this.getCopyData() // 此次数据和上次一样则不重复添加 if (lastData === data) return