mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 15:49:01 +02:00
Check the truth of subscription.customAccount, rather than definition.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user