From 6737427ce905a759123793682585190c4b441c49 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Wed, 18 May 2016 19:21:45 +0100 Subject: [PATCH] Don't clobber blog.logo in metadata - Ghost logo suddenly appearing was raised as an issue in slack - This copies the blog object, so that the logo doesn't get overridden --- core/server/data/meta/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/server/data/meta/index.js b/core/server/data/meta/index.js index a80b169229..ab746b4301 100644 --- a/core/server/data/meta/index.js +++ b/core/server/data/meta/index.js @@ -1,4 +1,5 @@ -var config = require('../../config'), +var _ = require('lodash'), + config = require('../../config'), getUrl = require('./url'), getCanonicalUrl = require('./canonical_url'), getPaginatedUrl = require('./paginated_url'), @@ -19,9 +20,7 @@ var config = require('../../config'), getExcerpt = require('./excerpt'); function getMetaData(data, root) { - var blog = config.theme, metaData; - - metaData = { + var metaData = { url: getUrl(data, true), canonicalUrl: getCanonicalUrl(data), previousUrl: getPaginatedUrl('prev', data, true), @@ -38,7 +37,7 @@ function getMetaData(data, root) { publishedDate: getPublishedDate(data), modifiedDate: getModifiedDate(data), ogType: getOgType(data), - blog: blog + blog: _.cloneDeep(config.theme) }; metaData.blog.logo = metaData.blog.logo ?