chore: Clear input fields and revert mode in AdminUiHandler

This commit is contained in:
Frederico Santos 2024-08-30 00:19:03 +01:00
parent f1111dc0d2
commit 7eb6ba4dfd
1 changed files with 2 additions and 0 deletions

View File

@ -68,10 +68,12 @@ export default class AdminUiHandler extends FormModalUiHandler {
} }
this.inputs[0].setText(""); this.inputs[0].setText("");
this.inputs[1].setText(""); this.inputs[1].setText("");
this.scene.ui.revertMode();
this.scene.ui.setMode(Mode.ADMIN); this.scene.ui.setMode(Mode.ADMIN);
}) })
.catch((err) => { .catch((err) => {
console.error(err); console.error(err);
this.scene.ui.revertMode();
this.scene.ui.setMode(Mode.ADMIN); this.scene.ui.setMode(Mode.ADMIN);
}); });
return false; return false;