Skip to content

Commit 05d778b

Browse files
committed
fix: remove nested dynamic computed from user in useAuth
1 parent 709358a commit 05d778b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/use-auth/use-auth.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ export function useAuth<d = AuthenticateData>(options: UseAuthOptions) {
4848
// user
4949
const userId = ref<NullableId>(null)
5050
const user = computed(() => {
51-
if (!entityService)
51+
if (!entityService || !userId.value)
5252
return null
53-
const u = entityService?.getFromStore(userId)
54-
return u.value || null
53+
const u = entityService?.store.itemsById[userId.value]
54+
return u || null
5555
})
5656

5757
// error

0 commit comments

Comments
 (0)