From a24bc7eb60444097d6188cfd560dbc0dad833002 Mon Sep 17 00:00:00 2001 From: Metachs <123@example.org> Date: Mon, 26 Aug 2024 15:55:35 -0400 Subject: [PATCH] Fix error when nothing is selected --- js/ui/tool/select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/tool/select.js b/js/ui/tool/select.js index c9d7f33..a1e69e7 100644 --- a/js/ui/tool/select.js +++ b/js/ui/tool/select.js @@ -718,7 +718,7 @@ const selectTransformTool = () => // Only checks if Selection exists and content has been selected // Does not check if content has been transformed, eg for deletion/applying to new layer state.applyTransform = async (eraseSelected = false, clearLayer = false, newLayer = null, keepOriginal = false) => { - const isBlank = + const isBlank = !state.selected || isCanvasBlank( 0, 0, state.selected.canvas.width, state.selected.canvas.height, state.selected.canvas); // Just reset state if nothing is selected, unless Clearing layer