1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-04 15:00:14 +01:00

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));