diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 755267fcede..6d70bb27ae5 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -332,7 +332,7 @@ export default class MenuUiHandler extends MessageUiHandler { if (button === Button.ACTION) { let adjustedCursor = this.cursor; const excludedMenu = this.excludedMenus().find(e => e.condition); - if (excludedMenu !== null && excludedMenu.options.length > 0) { + if (excludedMenu !== null && excludedMenu.options !== undefined && excludedMenu.options.length > 0) { const sortedOptions = excludedMenu.options.sort(); for (const imo of sortedOptions) { if (adjustedCursor >= imo) {