From 20f4af2eb4ae56af85954e2ab783131f455b4b4d Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 21 Jan 2014 17:24:24 +0000 Subject: [PATCH] Adding guard to meta_title fixes #1992 --- core/server/helpers/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/helpers/index.js b/core/server/helpers/index.js index f8807942f7..add7d41d2e 100644 --- a/core/server/helpers/index.js +++ b/core/server/helpers/index.js @@ -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; } }