Skip to content

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

[FE-2946] fix(studio): skip available-versions request when dbRegion is empty (#44561)

Alaister Young4814672f6f95
diff --git a/apps/studio/data/config/project-creation-postgres-versions-query.ts b/apps/studio/data/config/project-creation-postgres-versions-query.ts
index edb53b53051..2b974a1d06f 100644
--- a/apps/studio/data/config/project-creation-postgres-versions-query.ts
+++ b/apps/studio/data/config/project-creation-postgres-versions-query.ts
@@ -48,10 +48,7 @@ export const useProjectCreationPostgresVersionsQuery = <TData = ProjectCreationP
queryFn: ({ signal }) =>
getPostgresCreationVersions({ organizationSlug, cloudProvider, dbRegion }, signal),
enabled:
- enabled &&
- typeof organizationSlug !== 'undefined' &&
- organizationSlug !== '_' &&
- typeof dbRegion !== 'undefined',
+ enabled && typeof organizationSlug !== 'undefined' && organizationSlug !== '_' && !!dbRegion,
...options,
})
}