From e13c92f66190b62045a98e9b6cb3a66fd09393c5 Mon Sep 17 00:00:00 2001 From: Skyler Lehmkuhl Date: Thu, 23 Jan 2025 05:41:07 -0500 Subject: [PATCH] Fix clicking on layers bug --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index ef475c0..c375fee 100644 --- a/src/main.js +++ b/src/main.js @@ -3763,7 +3763,7 @@ class GraphicsObject extends Widget { this.setFrameNum(this.currentFrameNum - 1); } getFrame(num) { - return this.activeLayer.getFrame(num); + return this.activeLayer?.getFrame(num); } setFrameNum(num) { num = Math.max(0, num); @@ -6543,7 +6543,7 @@ function timeline() { updateUI(); updateMenu(); } else { - context.activeObject.currentLayer = i; + context.activeObject.currentLayer = i - context.activeObject.audioLayers.length; } } }