From 595061e20cccc2bb66c6e66c36b3eba7ada3ff76 Mon Sep 17 00:00:00 2001 From: oniani1 Date: Wed, 15 Apr 2026 11:45:15 +0400 Subject: [PATCH] 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> --- .../Subscription/SubscriptionPlanUpdateDialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx index a8e89faf09e..7cdafc430d7 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx @@ -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' && (