From 15905289e1f7ec6e9e897f81475e7ab64316f6aa Mon Sep 17 00:00:00 2001 From: Hippo Date: Sun, 26 Apr 2020 22:31:45 +0530 Subject: [PATCH] Bugfix: build fails if post doesn't have tags Because how can you iterate over something that doesn't exist? --- src/templates/GhostPost.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/templates/GhostPost.vue b/src/templates/GhostPost.vue index edce938..c99b7d8 100644 --- a/src/templates/GhostPost.vue +++ b/src/templates/GhostPost.vue @@ -99,8 +99,10 @@ export default { { property: 'article:published_time', content: this.thisPost.date }, ] - for (var i=0; i{return t.title}).join(',') }, + { property: 'twitter:data2', content: this.thisPost.tags ? this.thisPost.tags.map((t)=>{return t.title}).join(',') : '' }, ]) if (Admin.social_media && Admin.social_media.twitter) {