mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 12:01:32 +02:00
add null check and default empty object for subscirption dashboard
This commit is contained in:
@@ -105,7 +105,7 @@ module.exports = SubscriptionController =
|
||||
recomendedCurrency: subscription?.currency
|
||||
taxRate:subscription?.taxRate
|
||||
plans: plans
|
||||
subscription: subscription
|
||||
subscription: subscription || {}
|
||||
groups: groups
|
||||
subscriptionTabActive: true
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ define [
|
||||
|
||||
|
||||
App.controller "UserSubscriptionController", ($scope, MultiCurrencyPricing, $http, sixpack) ->
|
||||
freeTrialEndDate = new Date(subscription.trial_ends_at)
|
||||
freeTrialEndDate = new Date(subscription?.trial_ends_at)
|
||||
|
||||
sevenDaysTime = new Date()
|
||||
sevenDaysTime.setDate(sevenDaysTime.getDate() + 7)
|
||||
|
||||
Reference in New Issue
Block a user