mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
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.
This commit is contained in:
parent
f0a3ddaf09
commit
d7d7806dcf
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user