From d7d7806dcf646be0ca586cab80ffdc44c82226f4 Mon Sep 17 00:00:00 2001 From: "Fabien \"egg\" O'Carroll" Date: Wed, 9 Feb 2022 11:28:26 +0200 Subject: [PATCH] Protected against null value for subscription.plan no-issue This will only occur when Subscriptions have manually been modified in Stripe to no longer have a single price. --- ghost/members-api/lib/repositories/member.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/members-api/lib/repositories/member.js b/ghost/members-api/lib/repositories/member.js index d34f748721..71b07f6701 100644 --- a/ghost/members-api/lib/repositories/member.js +++ b/ghost/members-api/lib/repositories/member.js @@ -80,7 +80,7 @@ module.exports = class MemberRepository { } isComplimentarySubscription(subscription) { - return subscription.plan.nickname && subscription.plan.nickname.toLowerCase() === 'complimentary'; + return subscription.plan && subscription.plan.nickname && subscription.plan.nickname.toLowerCase() === 'complimentary'; } async get(data, options) {