From d67e4451e1f285b79283a00abdae26746d1d97f3 Mon Sep 17 00:00:00 2001 From: Lucas Dower Date: Mon, 26 Jun 2023 14:23:04 +0100 Subject: [PATCH] Fixed enabling non-existent action groups --- src/ui/layout.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ui/layout.ts b/src/ui/layout.ts index 2ebe505..ed20e14 100644 --- a/src/ui/layout.ts +++ b/src/ui/layout.ts @@ -790,10 +790,12 @@ export class UI { * Enable a specific action. */ public enable(action: EAction) { - this._forEachComponent(action, (component) => { - component.setEnabled(true); - }); - this._getGroup(action).execButton?.setEnabled(true); + if (action < EAction.MAX) { + this._forEachComponent(action, (component) => { + component.setEnabled(true); + }); + this._getGroup(action).execButton?.setEnabled(true); + } } /**