fix: sign up only working on the second attempt

This commit is contained in:
Miodec 2025-03-18 20:12:03 +01:00
parent daa3668848
commit 313897d0d1
2 changed files with 3 additions and 3 deletions

View file

@ -492,7 +492,7 @@ async function signUp(): Promise<void> {
});
return;
}
RegisterCaptchaModal.show();
await RegisterCaptchaModal.show();
const captchaToken = await RegisterCaptchaModal.promise;
if (captchaToken === undefined || captchaToken === "") {
Notifications.add("Please complete the captcha", -1);

View file

@ -7,8 +7,8 @@ export let promise = new Promise<string | undefined>((resolve) => {
resolvePromise = resolve;
});
export function show(): void {
void modal.show({
export async function show(): Promise<void> {
await modal.show({
mode: "dialog",
beforeAnimation: async (modal) => {
promise = new Promise((resolve) => {