explicit check for options
This commit is contained in:
parent
0d406b1092
commit
2f83e6e2e1
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue