fix: temporary hot fix for group.

This commit is contained in:
Darshan
2025-12-23 13:09:19 +05:30
parent deb74f9cdd
commit 79dec66713
+5 -1
View File
@@ -89,8 +89,12 @@ export function planHasGroup(billingPlanId: string, group: BillingPlanGroup) {
export function getBasePlanFromGroup(billingPlanGroup: BillingPlanGroup): Models.BillingPlan {
const plansInfoStore = get(plansInfo);
// hot fix for now, starter doesn't have a group atm.
const correctBillingPlanGroup =
billingPlanGroup === BillingPlanGroup.Starter ? null : billingPlanGroup;
const proPlans = Array.from(plansInfoStore.values()).filter(
(plan) => plan.group === billingPlanGroup
(plan) => plan.group === correctBillingPlanGroup
);
return proPlans.sort((a, b) => a.order - b.order)[0];