Skip to content

Commit

Permalink
fix: sync current account across tabs 2 (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin authored Jan 6, 2023
1 parent d8eec1e commit 573bf48
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions composables/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ if (process.client) {
watch(currentUserId, async (id, oldId) => {
// when sign in or switch account
if (id) {
// initial load
if (!oldId)
return

if (id === currentUser.value?.account?.id) {
// when sign in, the other tab will not have the user, idb is not reactive
const newUser = users.value.find(user => user.account?.id === id)
Expand Down

0 comments on commit 573bf48

Please sign in to comment.