Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Fix empty related media header (#1941)
Browse files Browse the repository at this point in the history
  • Loading branch information
0kyn authored Oct 28, 2022
1 parent b7c60a7 commit a8742eb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/image/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@
:image-height="imageHeight"
:image-type="imageType"
/>
<VRelatedImages :media="relatedMedia" :fetch-state="relatedFetchState" />
<VRelatedImages
v-if="hasRelatedMedia"
:media="relatedMedia"
:fetch-state="relatedFetchState"
/>
</div>
</template>

Expand Down Expand Up @@ -136,6 +140,7 @@ export default defineComponent({
)
const backToSearchPath = computed(() => route.value.meta?.backToSearchPath)
const hasRelatedMedia = computed(() => relatedMediaStore.media.length > 0)
const relatedMedia = computed(() => relatedMediaStore.media)
const relatedFetchState = computed(() => relatedMediaStore.fetchState)
Expand Down Expand Up @@ -207,6 +212,7 @@ export default defineComponent({
}
return {
image,
hasRelatedMedia,
relatedMedia,
relatedFetchState,
imageWidth,
Expand Down

0 comments on commit a8742eb

Please sign in to comment.