0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Issue #1556 - Fix meta_title is undefined

Closes #1556 and #1530

This should also fix meta_description in #1530 as well as the other bug that is not
filed for body_class
This commit is contained in:
ali 2013-11-25 06:15:04 +00:00 committed by Ali Al Dallal
parent 727b845254
commit 7946431b8d

View file

@ -24,7 +24,8 @@ function ghostLocals(req, res, next) {
res.locals.version = packageInfo.version;
res.locals.path = req.path;
res.locals.csrfToken = req.csrfToken();
res.locals.ghostRoot = req.path.replace(ghost.blogGlobals().path, '');
// Strip off the subdir part of the path
res.locals.ghostRoot = req.path.replace(ghost.blogGlobals().path.replace(/\/$/, ''), '');
if (res.isAdmin) {
api.users.read({id: req.session.user}).then(function (currentUser) {