Skip to content
This repository was archived by the owner on Sep 21, 2026. It is now read-only.

Commit b88f43b

Browse files
committed
Guard project limitation plan lookup
1 parent c6a1bfe commit b88f43b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/lib/stores/billing.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,10 @@ export function checkForUsageFees(plan: string | null | undefined, id: PlanServi
311311
} else return false;
312312
}
313313

314-
export function checkForProjectLimitation(plan: string, id: PlanServices) {
314+
export function checkForProjectLimitation(plan: string | null | undefined, id: PlanServices) {
315315
if (id === 'members') {
316316
const billingPlan = billingIdToPlan(plan);
317-
const hasUnlimitedProjects = billingPlan.projects === 0;
317+
const hasUnlimitedProjects = billingPlan?.projects === 0;
318318

319319
if (hasUnlimitedProjects) {
320320
return false; // No project limitation for members on Pro/Scale plans

0 commit comments

Comments
 (0)