null or undefined? who knows.

This commit is contained in:
Frederico Santos 2024-08-02 21:02:24 +01:00
parent 2f83e6e2e1
commit 9f68ba8671

View File

@ -332,7 +332,7 @@ export default class MenuUiHandler extends MessageUiHandler {
if (button === Button.ACTION) { if (button === Button.ACTION) {
let adjustedCursor = this.cursor; let adjustedCursor = this.cursor;
const excludedMenu = this.excludedMenus().find(e => e.condition); const excludedMenu = this.excludedMenus().find(e => e.condition);
if (excludedMenu !== null && excludedMenu.options !== undefined && excludedMenu.options.length > 0) { if (excludedMenu !== undefined && excludedMenu.options !== undefined && excludedMenu.options.length > 0) {
const sortedOptions = excludedMenu.options.sort(); const sortedOptions = excludedMenu.options.sort();
for (const imo of sortedOptions) { for (const imo of sortedOptions) {
if (adjustedCursor >= imo) { if (adjustedCursor >= imo) {