mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-18 02:21:47 -05:00
Added check for plan nickname to exist
no-issue When seeding the database with fake members & stripe data, it's possible to create stripe plans without a nickname. Similarly some other services do not have a nickname on their plans. This ensures that we do not error when working with these plans.
This commit is contained in:
parent
907ccd9f34
commit
cac4ca14ff
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ module.exports = class MemberRepository {
|
|||
}
|
||||
|
||||
isComplimentarySubscription(subscription) {
|
||||
return subscription.plan.nickname.toLowerCase() === 'complimentary';
|
||||
return subscription.plan.nickname && subscription.plan.nickname.toLowerCase() === 'complimentary';
|
||||
}
|
||||
|
||||
async get(data, options) {
|
||||
|
|
Loading…
Add table
Reference in a new issue