mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Check the truth of subscription.customAccount
, rather than definition.
This commit is contained in:
parent
effc3727be
commit
3aea3a68d1
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ module.exports =
|
|||
SubscriptionLocator.getUsersSubscription user._id, (err, subscription)->
|
||||
if err?
|
||||
return callback(err)
|
||||
hasValidSubscription = subscription? and (subscription.recurlySubscription_id? or subscription.customAccount?)
|
||||
hasValidSubscription = subscription? and (subscription.recurlySubscription_id? or subscription?.customAccount == true)
|
||||
logger.log user:user, hasValidSubscription:hasValidSubscription, subscription:subscription, "checking if user has subscription"
|
||||
callback err, hasValidSubscription, subscription
|
||||
|
||||
|
|
Loading…
Reference in a new issue