diff --git a/packages/builder/src/pages/builder/_layout.svelte b/packages/builder/src/pages/builder/_layout.svelte index f4715b3017..5a8e5e2fc9 100644 --- a/packages/builder/src/pages/builder/_layout.svelte +++ b/packages/builder/src/pages/builder/_layout.svelte @@ -17,7 +17,7 @@ if (!tenantId.includes("localhost:")) { // user doesn't have permission to access this tenant - kick them out - if (user && user.tenantId && user.tenantId !== tenantId) { + if (user?.tenantId !== tenantId) { await auth.logout() await auth.setOrganisation(null) } else {