diff --git a/src/middleware/render.js b/src/middleware/render.js index 4a80d4b9c8..4cf5567ae8 100644 --- a/src/middleware/render.js +++ b/src/middleware/render.js @@ -86,9 +86,8 @@ module.exports = function(middleware) { var clean = req.path.replace(/^\/api/, '').replace(/^\//, ''); var parts = clean.split('/').slice(0, 3); parts.forEach(function(p, index) { - parts[index] = index ? parts[index - 1] + '-' + p : 'page-' + (p || 'home'); + parts[index] = index ? parts[0] + '-' + p : 'page-' + (p || 'home'); }); - return parts.join(' '); }