From a9da867255ae9a15218f7a3ddb4c9c6039339708 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 15 Jul 2015 01:09:16 -0400 Subject: [PATCH] fix infinite redirect loop on /chats @julianlam --- src/controllers/accounts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/accounts.js b/src/controllers/accounts.js index f09de1ff5f..64a6d26786 100644 --- a/src/controllers/accounts.js +++ b/src/controllers/accounts.js @@ -493,7 +493,7 @@ accountsController.getChats = function(req, res, next) { // In case a userNAME is passed in instead of a slug, the route should not 404 var slugified = utils.slugify(req.params.userslug); - if (req.params.userslug !== slugified) { + if (req.params.userslug && req.params.userslug !== slugified) { return res.redirect(nconf.get('relative_path') + '/chats/' + slugified); }