Merge pull request #9148 from overleaf/tm-fix-custom-subscription-view

Remove Recurly property from personalSubscription object

GitOrigin-RevId: b1d86b8379471fcdeef15da9252d2c377ec673d6
This commit is contained in:
Thomas 2022-08-08 10:54:22 +02:00 committed by Copybot
parent 85e2ec0f8c
commit bf96ca52c1

View file

@ -188,6 +188,13 @@ function buildUsersSubscriptionViewModel(user, callback) {
personalSubscription.plan = plan
}
// Subscription DB object contains a recurly property, used to cache trial info
// on the project-list. However, this can cause the wrong template to render,
// if we do not have any subscription data from Recurly (recurlySubscription)
if (personalSubscription) {
delete personalSubscription.recurly
}
if (personalSubscription && recurlySubscription) {
const tax = recurlySubscription.tax_in_cents || 0
// Some plans allow adding more seats than the base plan provides.