fix(studio): show empty org warning when there are no active projects (#44870)

Closes #44872

The "Empty organization" admonition in the subscription upgrade dialog
checks `.length === 5` instead of `.length === 0`. The warning text says
"This organization has no active projects" but only shows for orgs with
exactly 5 active projects.

Introduced in #44494 (b9e83b25).

The adjacent `.length === 1` check for the single-project note is
correct, confirming this is a count comparison that should be `0`.

Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
This commit is contained in:
oniani1andGildas Garcia authored and GitHub committed 2026-04-15 09:45:15 +02:00
1 parent f434f739e1
commit 595061e20c
1 file changed
+1 -1
@@ -662,7 +662,7 @@ export const SubscriptionPlanUpdateDialog = ({
(it) =>
it.status === PROJECT_STATUS.ACTIVE_HEALTHY ||
it.status === PROJECT_STATUS.COMING_UP
).length === 5 &&
).length === 0 &&
subscriptionPreview?.plan_change_type !== 'downgrade' && (
<div className="pb-2">
<Admonition title="Empty organization" type="warning">