Fixed price reset when no monthly/yearly prices

no refs

When we reset the prices on leaving the membership settings screen, its possible we don't have the prices created already and not able to read any monthly/yearly price.
This commit is contained in:
Rishabh 2021-05-24 20:02:49 +05:30
parent b8e6107c6a
commit 1b491aa083

View File

@ -413,8 +413,8 @@ export default class MembersAccessController extends Controller {
const monthlyPrice = this.getPrice(activePrices, 'monthly');
const yearlyPrice = this.getPrice(activePrices, 'yearly');
this.stripeMonthlyAmount = (monthlyPrice.amount / 100);
this.stripeYearlyAmount = (yearlyPrice.amount / 100);
this.stripeMonthlyAmount = monthlyPrice ? (monthlyPrice.amount / 100) : 5;
this.stripeYearlyAmount = yearlyPrice ? (yearlyPrice.amount / 100) : 50;
}
reset() {