Fix logic, was wrong way around

This commit is contained in:
Shane Kilkelly 2016-09-22 11:16:50 +01:00
parent 41cc9e68b5
commit 64c9a3ae18

View file

@ -14,9 +14,9 @@ module.exports = SubscriptionController =
plansPage: (req, res, next) -> plansPage: (req, res, next) ->
plans = SubscriptionViewModelBuilder.buildViewModel() plans = SubscriptionViewModelBuilder.buildViewModel()
if AuthenticationController.isUserLoggedIn(req) if AuthenticationController.isUserLoggedIn(req)
baseUrl = "/register?redir="
else
baseUrl = "" baseUrl = ""
else
baseUrl = "/register?redir="
viewName = "subscriptions/plans" viewName = "subscriptions/plans"
if req.query.v? if req.query.v?
viewName = "#{viewName}_#{req.query.v}" viewName = "#{viewName}_#{req.query.v}"