diff --git a/src/components/auth/register/Register.svelte b/src/components/auth/register/Register.svelte index 7449b09..8c8e79e 100644 --- a/src/components/auth/register/Register.svelte +++ b/src/components/auth/register/Register.svelte @@ -33,6 +33,8 @@ authInProcess = true registrationSuccess = await register(username) + + if (!registrationSuccess) authInProcess = false } diff --git a/src/lib/common/webnative.ts b/src/lib/common/webnative.ts index 2302cad..3c403c7 100644 --- a/src/lib/common/webnative.ts +++ b/src/lib/common/webnative.ts @@ -89,6 +89,8 @@ export const isUsernameAvailable = async ( export const register = async (username: string): Promise => { const { success } = await webnative.account.register({ username }) + if (!success) return success + const fs = await webnative.bootstrapRootFileSystem() filesystemStore.set(fs)