Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

ensure connection string is present before loading project read-only state

Alaister Young1248504ad46a
diff --git a/studio/data/config/project-read-only-query.ts b/studio/data/config/project-read-only-query.ts
index d401ebee80e..23312f2f67e 100644
--- a/studio/data/config/project-read-only-query.ts
+++ b/studio/data/config/project-read-only-query.ts
@@ -38,6 +38,7 @@ export const useProjectReadOnlyQuery = (
select(data) {
return data.result[0]?.default_transaction_read_only === 'on'
},
+ enabled: typeof projectRef !== 'undefined' && typeof connectionString !== 'undefined',
...options,
}
)