fix issue with undo because this.elem was overwritten with node.remove()

This commit is contained in:
JFH
2020-06-28 21:52:27 +02:00
parent 18d73cfefa
commit 61591f6a2e
4 changed files with 33 additions and 6 deletions

View File

@@ -516,7 +516,7 @@ const undoMgr = canvas.undoMgr = new UndoManager({
} else if (!isApply) {
restoreRefElems(cmd.elem);
}
if (cmd.elem.tagName === 'use') {
if (cmd.elem && cmd.elem.tagName === 'use') {
setUseData(cmd.elem);
}
} else if (cmdType === ChangeElementCommand.type()) {