Skip to content

Commit

Permalink
prevent console warning if post has no tags
Browse files Browse the repository at this point in the history
  • Loading branch information
thooyork committed May 9, 2023
1 parent 557c1ef commit 79b848b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/components/PostPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<i>{{ post.updatedBy.fullName }}</i>
</div>

<display-tags :tags="post.tags"></display-tags>
<display-tags v-if="post.tags" :tags="post.tags"></display-tags>

<div class="my-4">
<router-link :to="'/posts/post/' + post.id" class="text-decoration-none">
Expand Down
2 changes: 1 addition & 1 deletion client/src/views/PostView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<i>{{ post.updatedBy.fullName }}</i>
</div>

<display-tags :tags="post.tags"></display-tags>
<display-tags v-if="post.tags" :tags="post.tags"></display-tags>

<div v-html="post.sanitizedHtml" class="mt-4"></div>
</div>
Expand Down

0 comments on commit 79b848b

Please sign in to comment.