From 573bf48eda51ab89a151bb874ed44289d32b7e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Fri, 6 Jan 2023 10:34:18 +0100 Subject: [PATCH] fix: sync current account across tabs 2 (#816) --- composables/users.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/composables/users.ts b/composables/users.ts index 103847f5..e4dce99c 100644 --- a/composables/users.ts +++ b/composables/users.ts @@ -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)