1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-08 22:10:44 +00:00

add null check and default empty object for subscirption dashboard

This commit is contained in:
Henry Oswald 2016-02-03 17:41:05 +00:00
parent 8af9aa6396
commit 47eebb1840
2 changed files with 2 additions and 2 deletions
services/web
app/coffee/Features/Subscription
public/coffee/main

View file

@ -105,7 +105,7 @@ module.exports = SubscriptionController =
recomendedCurrency: subscription?.currency
taxRate:subscription?.taxRate
plans: plans
subscription: subscription
subscription: subscription || {}
groups: groups
subscriptionTabActive: true

View file

@ -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)