- {#if profile?.coins > 0}
+ {#if profile && profile?.coins > 0}
{profile.coins}
{/if}
- {#if profile?.coupons > 0}
+ {#if profile && profile?.coupons > 0}
{profile.coupons}
diff --git a/src/routes/[lang]/(website)/character/+page.svelte b/src/routes/[lang]/(website)/character/+page.svelte
index f748d141..d2791dad 100644
--- a/src/routes/[lang]/(website)/character/+page.svelte
+++ b/src/routes/[lang]/(website)/character/+page.svelte
@@ -1,8 +1,11 @@
@@ -14,7 +17,7 @@
-
{$page.data.profileData.coins}
+
{profile?.coins}
Монет
diff --git a/src/routes/[lang]/(website)/character/new/+page.svelte b/src/routes/[lang]/(website)/character/new/+page.svelte
index 1c4b873f..c9b3f723 100644
--- a/src/routes/[lang]/(website)/character/new/+page.svelte
+++ b/src/routes/[lang]/(website)/character/new/+page.svelte
@@ -2,7 +2,7 @@
import coinSmall from '$lib/assets/website/coin-64.png'
import { page } from '$app/stores'
- const isEnoughCoins = $page.data.profileData.coins >= 5
+ const isEnoughCoins = $page.data.profileData?.coins >= 5
let isCheckedTerms = $state(false)
let isNicknameUnique = $state(false)
let nickname = $state('')