Set empty array instead of null to mediaIds property of posts

This commit is contained in:
Akihiko Odaki
2018-03-31 19:45:56 +09:00
parent 4e37ee541a
commit 8c41432907
10 changed files with 11 additions and 10 deletions

View File

@@ -42,7 +42,7 @@
<div class="tags" v-if="p.tags && p.tags.length > 0">
<router-link v-for="tag in p.tags" :key="tag" :to="`/search?q=#${tag}`">{{ tag }}</router-link>
</div>
<div class="media" v-if="p.media">
<div class="media" v-if="p.media.length > 0">
<mk-media-list :media-list="p.media"/>
</div>
<mk-poll v-if="p.poll" :post="p"/>

View File

@@ -40,7 +40,7 @@
<mk-post-html v-if="p.ast" :ast="p.ast" :i="os.i" :class="$style.text"/>
<a class="rp" v-if="p.repost != null">RP:</a>
</div>
<div class="media" v-if="p.media">
<div class="media" v-if="p.media.length > 0">
<mk-media-list :media-list="p.media"/>
</div>
<mk-poll v-if="p.poll" :post="p" ref="pollViewer"/>

View File

@@ -5,7 +5,7 @@
<mk-post-html v-if="post.ast" :ast="post.ast" :i="os.i"/>
<a class="rp" v-if="post.repostId">RP: ...</a>
</div>
<details v-if="post.media">
<details v-if="post.media.length > 0">
<summary>({{ post.media.length }}個のメディア)</summary>
<mk-media-list :media-list="post.media"/>
</details>