diff --git a/packages/builder/src/pages/builder/_layout.svelte b/packages/builder/src/pages/builder/_layout.svelte
index f248210962..338322b785 100644
--- a/packages/builder/src/pages/builder/_layout.svelte
+++ b/packages/builder/src/pages/builder/_layout.svelte
@@ -20,7 +20,7 @@
if (!tenantId.includes("localhost:")) {
// user doesn't have permission to access this tenant - kick them out
- if (user?.tenantId !== tenantId) {
+ if (user && user.tenantId !== tenantId) {
await auth.logout()
await auth.setOrganisation(null)
} else {
diff --git a/packages/builder/src/pages/builder/auth/login.svelte b/packages/builder/src/pages/builder/auth/login.svelte
index f9f2b34578..a1dea8fd68 100644
--- a/packages/builder/src/pages/builder/auth/login.svelte
+++ b/packages/builder/src/pages/builder/auth/login.svelte
@@ -22,6 +22,7 @@
$: company = $organisation.company || "Budibase"
$: multiTenancyEnabled = $admin.multiTenancy
+ $: cloud = $admin.cloud
async function login() {
try {
@@ -84,7 +85,7 @@
$goto("./forgot")}>
Forgot password?
- {#if multiTenancyEnabled}
+ {#if multiTenancyEnabled && !cloud}
{