diff --git a/js/draw/drag.js b/js/draw/drag.js index 734fa2d..5521da2 100644 --- a/js/draw/drag.js +++ b/js/draw/drag.js @@ -46,7 +46,9 @@ export function dragMove(event) { } export function dragEnd() { - currentObject.zIndex = 1; + if (currentObject) { + currentObject.zIndex = 1; + } const app = getApp(); app.stage.off("pointermove", dragMove); }