From 1107c11a8ca6a73315d99830efc544ba4532d236 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Thu, 22 May 2025 16:28:32 -0700 Subject: [PATCH] fix(support): fix upgrade URL for free organization Even though upgradeURL isn't used when there are no free orgs, this line is still evaluated and will throw an error because freeOrganization is undefined. This commit adds a null check to prevent this error. --- src/lib/components/support.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/support.svelte b/src/lib/components/support.svelte index cad7a08bfa..560e33b942 100644 --- a/src/lib/components/support.svelte +++ b/src/lib/components/support.svelte @@ -27,7 +27,7 @@ (team) => !$plansInfo.get((team as Organization).billingPlan)?.premiumSupport ); - $: upgradeURL = `${base}/organization-${freeOrganization.$id}/change-plan`; + $: upgradeURL = `${base}/organization-${freeOrganization?.$id}/change-plan`; $: supportTimings = `${utcHourToLocaleHour('16:00')} - ${utcHourToLocaleHour('00:00')} ${localeShortTimezoneName()}`;