From 2cb96e251ea88a4fdfd86de44d7a23b167dc1797 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 4 Oct 2025 18:13:14 +0800 Subject: [PATCH] :loud_sound: Add more user store logs --- app/stores/user.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/stores/user.ts b/app/stores/user.ts index e374ff4..6786306 100644 --- a/app/stores/user.ts +++ b/app/stores/user.ts @@ -15,8 +15,14 @@ export const useUserStore = defineStore("user", () => { // Actions async function fetchUser(reload = true) { - if (isLoading.value) return - if (!reload && user.value) return // Skip fetching if already loaded and not forced to + if (isLoading.value) { + console.log("[UserStore] Fetch already in progress. Skipping.") + return; + } + if (!reload && user.value) { + console.log(`[UserStore] User store was loaded with account @${user.value.name} and no reload. Skipping.`) + return; + } isLoading.value = true error.value = null