From 740bdb4e247b6bc259ab704c36f79e28b8dc08ea Mon Sep 17 00:00:00 2001 From: Harsh Mahajan Date: Thu, 2 Apr 2026 17:32:17 +0530 Subject: [PATCH] address greptile comments --- src/routes/(console)/+error.svelte | 5 +++-- src/routes/(console)/+layout.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/routes/(console)/+error.svelte b/src/routes/(console)/+error.svelte index 57691dd85..41863e61a 100644 --- a/src/routes/(console)/+error.svelte +++ b/src/routes/(console)/+error.svelte @@ -8,8 +8,9 @@ import { Typography } from '@appwrite.io/pink-svelte'; $effect(() => { - if (isVerifyEmailRedirectError(page.error)) { - goto(resolve('/verify-email'), { replaceState: true }); + const verifyEmailPath = resolve('/verify-email'); + if (isVerifyEmailRedirectError(page.error) && page.url.pathname !== verifyEmailPath) { + goto(verifyEmailPath, { replaceState: true }); } }); diff --git a/src/routes/(console)/+layout.ts b/src/routes/(console)/+layout.ts index 2904bb5c6..f40123b43 100644 --- a/src/routes/(console)/+layout.ts +++ b/src/routes/(console)/+layout.ts @@ -27,7 +27,7 @@ export const load: LayoutLoad = async ({ depends, parent, url }) => { depends(Dependencies.ORGANIZATION); const [preferences, rawConsoleVariables, versionData] = await Promise.all([ - sdk.forConsole.account.getPrefs(), + sdk.forConsole.account.getPrefs().catch(() => ({}) as Models.DefaultPreferences), sdk.forConsole.console.variables().catch(() => ({}) as Models.ConsoleVariables), fetch(`${endpoint}/health/version`, { headers: { 'X-Appwrite-Project': project as string }