diff --git a/ghost/core/core/frontend/services/sitemap/BaseSiteMapGenerator.js b/ghost/core/core/frontend/services/sitemap/BaseSiteMapGenerator.js index 08cf7588fa..3f60c69f18 100644 --- a/ghost/core/core/frontend/services/sitemap/BaseSiteMapGenerator.js +++ b/ghost/core/core/frontend/services/sitemap/BaseSiteMapGenerator.js @@ -95,6 +95,9 @@ class BaseSiteMapGenerator { this.lastModified = Date.now(); } + /** + * @returns {moment.Moment} + */ getLastModifiedForDatum(datum) { if (datum.updated_at || datum.published_at || datum.created_at) { const modifiedDate = datum.updated_at || datum.published_at || datum.created_at; @@ -126,7 +129,7 @@ class BaseSiteMapGenerator { node = { url: [ {loc: url}, - {lastmod: moment(this.getLastModifiedForDatum(datum)).toISOString()} + {lastmod: this.getLastModifiedForDatum(datum).toISOString()} ] };