Переглянути джерело

Ensure overleaf settings is defined before linking to the v1 subscription page

Alberto Fernández Capel 8 роки тому
батько
коміт
d76a6ae710
1 змінених файлів з 2 додано та 5 видалено
  1. 2 5
      services/web/app/views/subscriptions/dashboard.pug

+ 2 - 5
services/web/app/views/subscriptions/dashboard.pug

@@ -118,14 +118,14 @@ block content
 								a(href="/subscription/group").btn.btn-primary !{translate("manage_group")}
 								a(href="/subscription/group").btn.btn-primary !{translate("manage_group")}
 							hr
 							hr
 
 
-						if v1Subscriptions && v1Subscriptions.has_subscription
+						if settings.overleaf && v1Subscriptions && v1Subscriptions.has_subscription
 							p
 							p
 								| You are subscribed to Overleaf through Overleaf v1
 								| You are subscribed to Overleaf through Overleaf v1
 							p
 							p
 								a.btn.btn-primary(href=settings.overleaf.host+"/users/edit#status") Manage v1 Subscription
 								a.btn.btn-primary(href=settings.overleaf.host+"/users/edit#status") Manage v1 Subscription
 							hr
 							hr
 
 
-						if v1Subscriptions && v1Subscriptions.teams && v1Subscriptions.teams.length > 0
+						if settings.overleaf && v1Subscriptions && v1Subscriptions.teams && v1Subscriptions.teams.length > 0
 							for team in v1Subscriptions.teams
 							for team in v1Subscriptions.teams
 								p
 								p
 									| You are a member of the Overleaf v1 team: <strong>#{team.name}</strong>
 									| You are a member of the Overleaf v1 team: <strong>#{team.name}</strong>
@@ -199,6 +199,3 @@ block content
 			)
 			)
 				span(ng-hide="inflight") #{translate("leave_now")}
 				span(ng-hide="inflight") #{translate("leave_now")}
 				span(ng-show="inflight") #{translate("processing")}...
 				span(ng-show="inflight") #{translate("processing")}...
-
-
-