From 1b491aa083f93b5d2f127f776c67c002490d9ec0 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Mon, 24 May 2021 20:02:49 +0530 Subject: [PATCH] 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. --- ghost/admin/app/controllers/settings/membership.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/admin/app/controllers/settings/membership.js b/ghost/admin/app/controllers/settings/membership.js index 0da6ada778..806b9d479a 100644 --- a/ghost/admin/app/controllers/settings/membership.js +++ b/ghost/admin/app/controllers/settings/membership.js @@ -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() {