Skip to content

Commit 740bdb4

Browse files
committed
address greptile comments
1 parent fc43e00 commit 740bdb4

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/routes/(console)/+error.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
import { Typography } from '@appwrite.io/pink-svelte';
99
1010
$effect(() => {
11-
if (isVerifyEmailRedirectError(page.error)) {
12-
goto(resolve('/verify-email'), { replaceState: true });
11+
const verifyEmailPath = resolve('/verify-email');
12+
if (isVerifyEmailRedirectError(page.error) && page.url.pathname !== verifyEmailPath) {
13+
goto(verifyEmailPath, { replaceState: true });
1314
}
1415
});
1516
</script>

src/routes/(console)/+layout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const load: LayoutLoad = async ({ depends, parent, url }) => {
2727
depends(Dependencies.ORGANIZATION);
2828

2929
const [preferences, rawConsoleVariables, versionData] = await Promise.all([
30-
sdk.forConsole.account.getPrefs(),
30+
sdk.forConsole.account.getPrefs().catch(() => ({}) as Models.DefaultPreferences),
3131
sdk.forConsole.console.variables().catch(() => ({}) as Models.ConsoleVariables),
3232
fetch(`${endpoint}/health/version`, {
3333
headers: { 'X-Appwrite-Project': project as string }

0 commit comments

Comments
 (0)