mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-17 01:37:36 +00:00
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) {
|
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.length > 0) {
|
if (excludedMenu !== null && 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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user