From 87a19dfb7d9e4a8827e02059a8388f2496fb468c Mon Sep 17 00:00:00 2001 From: km384 <97592792+km384@users.noreply.github.com> Date: Wed, 12 Jan 2022 21:13:28 +0530 Subject: [PATCH] Add fix explanation --- src/svgcanvas/utilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/svgcanvas/utilities.js b/src/svgcanvas/utilities.js index c4f84a82d..470845745 100644 --- a/src/svgcanvas/utilities.js +++ b/src/svgcanvas/utilities.js @@ -762,7 +762,7 @@ export const convertToPath = (elem, attrs, svgCanvas) => { const { nextSibling } = elem batchCmd.addSubCommand(new svgCanvas.history.RemoveElementCommand(elem, nextSibling, elem.parentNode)) svgCanvas.clearSelection() - elem.remove() + elem.remove() // We need to remove this element otherwise the nextSibling of 'path' won't be null and an exception will be thrown after subsequent undo and redos. batchCmd.addSubCommand(new svgCanvas.history.InsertElementCommand(path)) path.setAttribute('id', id)