mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): 修改根节点不添加历史记录
This commit is contained in:
parent
19d24f4089
commit
c9aab11e03
@ -548,7 +548,9 @@ class Editor extends BaseService {
|
||||
|
||||
const newNodes = await Promise.all(nodes.map((node) => this.doUpdate(node)));
|
||||
|
||||
this.pushHistoryState();
|
||||
if (newNodes[0]?.type !== NodeType.ROOT) {
|
||||
this.pushHistoryState();
|
||||
}
|
||||
|
||||
this.emit('update', newNodes);
|
||||
return Array.isArray(config) ? newNodes : newNodes[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user