From 42e0c1dbe9e70d92083116f86f98e0557639f2a8 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 17 Oct 2026 14:28:05 +0200 Subject: [PATCH] Bugfix/type check of unsupported language codes in Stripe checkout session (#8189) Fix type check --- apps/api/src/app/subscription/subscription.service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/api/src/app/subscription/subscription.service.ts b/apps/api/src/app/subscription/subscription.service.ts index b46d385432..867df56c91 100644 --- a/apps/api/src/app/subscription/subscription.service.ts +++ b/apps/api/src/app/subscription/subscription.service.ts @@ -268,7 +268,12 @@ export class SubscriptionService { const unsupportedLanguageCodes: Record< Exclude< (typeof SUPPORTED_LANGUAGE_CODES)[number], - Stripe.Checkout.SessionCreateParams.Locale + // Extract keeps only the Stripe locales that Ghostfolio supports. + // This also removes OtherString, which matches every string. + Extract< + Stripe.Checkout.SessionCreateParams.Locale, + (typeof SUPPORTED_LANGUAGE_CODES)[number] + > >, true > = {