diff --git a/stores/auth.ts b/stores/auth.ts index e470c40..7cf5038 100644 --- a/stores/auth.ts +++ b/stores/auth.ts @@ -1,5 +1,4 @@ import { defineStore } from 'pinia'; -import { isServer } from '#imports' export const useAuthStore = defineStore('auth', () => { const accessToken = useCookie('access_token', { @@ -43,8 +42,7 @@ export const useAuthStore = defineStore('auth', () => { } const fetchUser = async () => { - if (isServer) return; - if (!accessToken.value) return + if (process.server || !accessToken.value) return; try { const data = await $fetch(`${config.public.apiBase}/auth/users/me/`, { headers: {