fix infinite redirect loop on /chats @julianlam

This commit is contained in:
barisusakli
2015-07-15 01:09:16 -04:00
parent ee7e36ae44
commit a9da867255

View File

@@ -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 // In case a userNAME is passed in instead of a slug, the route should not 404
var slugified = utils.slugify(req.params.userslug); 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); return res.redirect(nconf.get('relative_path') + '/chats/' + slugified);
} }