Fixed error when clicking the delete draggable element with none available.

This commit is contained in:
Saud Fatayerji 2023-05-08 12:36:39 +03:00
parent 1a521505a6
commit e0350b2837

View File

@ -113,7 +113,9 @@ const DraggableUtils = {
})
},
deleteDraggableCanvas(element) {
element.remove();
if (element) {
element.remove();
}
},
deleteDraggableCanvasById(id) {
this.deleteDraggableCanvas(document.getElementById(id));