Fix being unable to close menu if opened during certain times

pull/16/head
Flashfyre 2024-03-23 17:47:15 -04:00
parent 1df2297824
commit de1ba57421
1 changed files with 4 additions and 2 deletions

View File

@ -277,8 +277,10 @@ export default class MenuUiHandler extends MessageUiHandler {
} }
} else if (button === Button.CANCEL) { } else if (button === Button.CANCEL) {
success = true; success = true;
if (!ui.revertMode()) ui.revertMode().then(result => {
ui.setMode(Mode.MESSAGE); if (!result)
ui.setMode(Mode.MESSAGE);
});
} else { } else {
switch (button) { switch (button) {
case Button.UP: case Button.UP: