fix breadcrumbs and home /api route not loading

This commit is contained in:
Baris Usakli
2017-11-15 14:48:28 -05:00
parent 6a623c30d7
commit 38e52a65be
6 changed files with 11 additions and 10 deletions

View File

@@ -52,7 +52,7 @@ popularController.get = function (req, res, next) {
term: term,
};
if (req.path.startsWith('/api/popular') || req.path.startsWith('/popular')) {
if (req.originalUrl.startsWith(nconf.get('relative_path') + '/api/popular') || req.originalUrl.startsWith(nconf.get('relative_path') + '/popular')) {
var breadcrumbs = [{ text: termToBreadcrumb[term] }];
if (req.params.term) {