Skip to content

Commit

Permalink
Adding guard to meta_title
Browse files Browse the repository at this point in the history
  • Loading branch information
ErisDS committed Jan 21, 2014
1 parent 2aa7288 commit 20f4af2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/server/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 20f4af2

Please sign in to comment.