Bugfix: build fails if post has no authors
Because it tries to count the first one anyway
This commit is contained in:
parent
15905289e1
commit
1d469620ba
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ export default {
|
|||
{ property: 'twitter:url', content: baseUrl + this.thisPost.path },
|
||||
{ property: 'twitter:image', content: changeUrls(this.thisPost.image) },
|
||||
{ property: 'twitter:label1', content: 'Written by' },
|
||||
{ property: 'twitter:data1', content: this.thisPost.authors[0].name },
|
||||
{ property: 'twitter:data1', content: this.thisPost.authors ? this.thisPost.authors[0].name : '' },
|
||||
{ property: 'twitter:label2', content: 'Filed under' },
|
||||
{ property: 'twitter:data2', content: this.thisPost.tags ? this.thisPost.tags.map((t)=>{return t.title}).join(',') : '' },
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue