Node.js based forum software built for the modern web
fix infinite redirect loop on /chats @julianlam
barisusaklia9da867255ae
diff --git a/src/controllers/accounts.js b/src/controllers/accounts.jsindex 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 404var 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);}