From d5d2d7f35f1c41a56c22bc71e9621cfa71e9a397 Mon Sep 17 00:00:00 2001 From: Vishal Kumar Singh Date: Thu, 23 Apr 2026 15:06:37 +0530 Subject: [PATCH] fix(billing): don't access billingPlanDetails without optional chaining in ContainerButton Self-hosted deployments populate organization but leave billingPlanDetails undefined (there is no billing plan). ContainerButton precomputes the default tooltipContent at component instantiation with organization?.billingPlanDetails.group and billingPlanDetails.name, so the moment any page that renders a ContainerButton (e.g. Project > Functions > Templates) loads on self-hosted, Svelte throws a TypeError and the rest of the view blanks out. This was already observed on the Auth Security page and addressed there in #2958; the same pattern is still live in containerButton.svelte for every other consumer. Switch both property reads to optional chaining so the tooltip falls back gracefully on self-hosted. Fixes #2975. --- src/lib/layout/containerButton.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/layout/containerButton.svelte b/src/lib/layout/containerButton.svelte index 370abfe349..df3aca4b50 100644 --- a/src/lib/layout/containerButton.svelte +++ b/src/lib/layout/containerButton.svelte @@ -10,10 +10,10 @@ export let title: string; export let tooltipContent = - $organization?.billingPlanDetails.group === BillingPlanGroup.Starter + $organization?.billingPlanDetails?.group === BillingPlanGroup.Starter ? `Upgrade to add more ${title.toLocaleLowerCase()}` : `You've reached the ${title.toLocaleLowerCase()} limit for the ${ - $organization?.billingPlanDetails.name + $organization?.billingPlanDetails?.name } plan`; export let disabled: boolean;