mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-09 08:05:41 +08:00
fix: sign up only working on the second attempt
This commit is contained in:
parent
daa3668848
commit
313897d0d1
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue