Fix clicking on layers bug

This commit is contained in:
Skyler Lehmkuhl 2025-01-23 05:41:07 -05:00
parent 279cf538ab
commit e13c92f661
1 changed files with 2 additions and 2 deletions

View File

@ -3763,7 +3763,7 @@ class GraphicsObject extends Widget {
this.setFrameNum(this.currentFrameNum - 1); this.setFrameNum(this.currentFrameNum - 1);
} }
getFrame(num) { getFrame(num) {
return this.activeLayer.getFrame(num); return this.activeLayer?.getFrame(num);
} }
setFrameNum(num) { setFrameNum(num) {
num = Math.max(0, num); num = Math.max(0, num);
@ -6543,7 +6543,7 @@ function timeline() {
updateUI(); updateUI();
updateMenu(); updateMenu();
} else { } else {
context.activeObject.currentLayer = i; context.activeObject.currentLayer = i - context.activeObject.audioLayers.length;
} }
} }
} }