From 27fd09007575a8104e8b2a554e04b68f388872f4 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Thu, 25 Oct 2018 13:37:37 +0100 Subject: [PATCH] Merge pull request #1064 from sharelatex/as-fix-500-on-teams Fix 500 on /teams route GitOrigin-RevId: 9f554f9b77fb7fea64db1ad9c4d8635f47efff9e --- services/web/app/coffee/router.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/app/coffee/router.coffee b/services/web/app/coffee/router.coffee index 592ddaa061..c2a19414be 100644 --- a/services/web/app/coffee/router.coffee +++ b/services/web/app/coffee/router.coffee @@ -340,8 +340,10 @@ module.exports = class Router # Otherwise show some information about teams if AuthenticationController.isUserLoggedIn(req) res.redirect('/user/subscription') + else if Settings.overleaf?.host + res.redirect("#{Settings.overleaf.host}/teams") else - res.redirect("#{settings.overleaf.host}/teams") + next() webRouter.get '/chrome', (req, res, next) -> # Match v1 behaviour - this is used for a Chrome web app