refactor: Update excludedMenus condition to look at the end of the modeChain

This commit is contained in:
Frederico Santos 2024-08-31 03:33:07 +01:00
parent dd0b6464d2
commit 5e2c05afe9
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ export default class MenuUiHandler extends MessageUiHandler {
render() { render() {
const ui = this.getUi(); const ui = this.getUi();
this.excludedMenus = () => [ 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] } { condition: bypassLogin, options: [MenuOptions.LOG_OUT] }
]; ];