0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Adding guard to meta_title

fixes #1992
This commit is contained in:
Hannah Wolfe 2014-01-21 17:24:24 +00:00
parent 2aa7288777
commit 20f4af2eb4

View file

@ -385,14 +385,14 @@ coreHelpers.ghost_foot = function (options) {
coreHelpers.meta_title = function (options) {
/*jslint unparam:true*/
var title,
var title = "",
blog;
if (_.isString(this.relativeUrl)) {
if (!this.relativeUrl || this.relativeUrl === '/' || this.relativeUrl === '' || this.relativeUrl.match(/\/page/)) {
blog = config.theme();
title = blog.title;
} else {
} else if (this.post) {
title = this.post.title;
}
}