From 5e2c05afe9743bf983e2299db8226c03257a5df9 Mon Sep 17 00:00:00 2001 From: Frederico Santos Date: Sat, 31 Aug 2024 03:33:07 +0100 Subject: [PATCH] refactor: Update excludedMenus condition to look at the end of the modeChain --- src/ui/menu-ui-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 9e96eda9cc5..e8f2038aa2c 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -106,7 +106,7 @@ export default class MenuUiHandler extends MessageUiHandler { render() { const ui = this.getUi(); this.excludedMenus = () => [ - { condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain()[0]), options: [MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] }, + { condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain().at(-1)!), options: [MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] }, { condition: bypassLogin, options: [MenuOptions.LOG_OUT] } ];