From 8c74a1fb50a7fc023d8c537f26ebf1fac30d9cd9 Mon Sep 17 00:00:00 2001 From: simon-debruijn Date: Fri, 12 Jul 2024 11:10:13 +0200 Subject: [PATCH] Don't prefill subscriptionId when it is falsy --- resources/ts/Pages/Integrations/New.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/ts/Pages/Integrations/New.tsx b/resources/ts/Pages/Integrations/New.tsx index 627e05507..00d33846c 100644 --- a/resources/ts/Pages/Integrations/New.tsx +++ b/resources/ts/Pages/Integrations/New.tsx @@ -77,7 +77,9 @@ const New = ({ subscriptions }: Props) => { subscription.category === SubscriptionCategory.Free )?.id; - setData("subscriptionId", freeSubscriptionId ?? ""); + if (!freeSubscriptionId) return; + + setData("subscriptionId", freeSubscriptionId); // eslint-disable-next-line react-hooks/exhaustive-deps }, [activeType, subscriptions]);