mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
added recurly subscription null checks
this deals with a user who has an expired old subscription then is added to a group subscription.
This commit is contained in:
parent
42d8f1f222
commit
e4a54cbdfc
1 changed files with 4 additions and 4 deletions
|
@ -19,11 +19,11 @@ module.exports =
|
||||||
RecurlyWrapper.getSubscription subscription.recurlySubscription_id, (err, recurlySubscription)->
|
RecurlyWrapper.getSubscription subscription.recurlySubscription_id, (err, recurlySubscription)->
|
||||||
callback null, {
|
callback null, {
|
||||||
name: plan.name
|
name: plan.name
|
||||||
nextPaymentDueAt: SubscriptionFormatters.formatDate(recurlySubscription.current_period_ends_at)
|
nextPaymentDueAt: SubscriptionFormatters.formatDate(recurlySubscription?.current_period_ends_at)
|
||||||
state: recurlySubscription.state
|
state: recurlySubscription?.state
|
||||||
price: SubscriptionFormatters.formatPrice recurlySubscription.unit_amount_in_cents, recurlySubscription.currency
|
price: SubscriptionFormatters.formatPrice recurlySubscription?.unit_amount_in_cents, recurlySubscription?.currency
|
||||||
planCode: subscription.planCode
|
planCode: subscription.planCode
|
||||||
currency:recurlySubscription.currency
|
currency:recurlySubscription?.currency
|
||||||
groupPlan: subscription.groupPlan
|
groupPlan: subscription.groupPlan
|
||||||
}, memberSubscriptions
|
}, memberSubscriptions
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue