web: handle null productId

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
This commit is contained in:
01zulfi
2025-12-10 13:01:55 +05:00
parent 22b2d50139
commit 144febb3cc
2 changed files with 2 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ export const BuyDialog = DialogManager.register(function BuyDialog(
</Text>
</Flex>
<PlansList
selectedPlan={user?.subscription.productId}
selectedPlan={user?.subscription?.productId}
recommendedPlan={SubscriptionPlan.PRO}
onPlanSelected={(plan) => selectPlan(plan)}
/>

View File

@@ -42,7 +42,7 @@ import { useStore as useUserStore } from "../../stores/user-store";
import { getCurrencySymbol } from "../../common/currencies";
type PlansListProps = {
selectedPlan?: string;
selectedPlan?: string | null;
loadAllPlans?: boolean;
ignoreTrial?: boolean;
recommendedPlan?: SubscriptionPlan;