diff --git a/stores/user.js b/stores/user.js index e995231131ec37b03360260a5beb3bca823435d2..3b6c64a4d007d638c818ad0c28f876bed1cf2b2c 100644 --- a/stores/user.js +++ b/stores/user.js @@ -20,6 +20,7 @@ export const useUserStore = defineStore('user', () => { } async function $updateUserInfo () { + if (!token.value) return const { data } = await useRequest('/v1/user/user_info') userInfo.value = JSON.stringify(data.value.data) }