diff --git a/frontend/src/routes/(authenticated)/project/create/+page.svelte b/frontend/src/routes/(authenticated)/project/create/+page.svelte index eab5f7f54..acbaa9cf1 100644 --- a/frontend/src/routes/(authenticated)/project/create/+page.svelte +++ b/frontend/src/routes/(authenticated)/project/create/+page.svelte @@ -172,10 +172,12 @@ let showRelatedProjects = true; async function askToJoinProject(projectId: string, projectName: string): Promise { - await _askToJoinProject(projectId); - notifySuccess($t('project.create.join_request_sent', { projectName })) - $tainted = undefined; // Prevent "are you sure you want to leave?" warning - await goto('/'); + const joinResult = await _askToJoinProject(projectId); + if (!joinResult.error) { + notifySuccess($t('project.create.join_request_sent', { projectName })) + $tainted = undefined; // Prevent "are you sure you want to leave?" warning + await goto('/'); + } } diff --git a/frontend/src/routes/(authenticated)/project/create/+page.ts b/frontend/src/routes/(authenticated)/project/create/+page.ts index 0c72cf0d7..18a413224 100644 --- a/frontend/src/routes/(authenticated)/project/create/+page.ts +++ b/frontend/src/routes/(authenticated)/project/create/+page.ts @@ -127,5 +127,4 @@ export async function _askToJoinProject(projectId: string): $OpResult