diff --git a/frontend/src/components/common/Collection/Card.vue b/frontend/src/components/common/Collection/Card.vue index ef43729dc..867f59565 100644 --- a/frontend/src/components/common/Collection/Card.vue +++ b/frontend/src/components/common/Collection/Card.vue @@ -23,7 +23,7 @@ const props = withDefaults( showRomCount: false, withLink: false, src: "", - } + }, ); const galleryViewStore = storeGalleryView(); @@ -37,7 +37,7 @@ const memoizedCovers = ref({ const collectionCoverImage = computed(() => props.collection.name?.toLowerCase() == "favourites" ? getFavoriteCoverImage(props.collection.name) - : getCollectionCoverImage(props.collection.name) + : getCollectionCoverImage(props.collection.name), ); watchEffect(() => { @@ -122,35 +122,40 @@ const secondSmallCover = computed(() => memoizedCovers.value.small[1]); class="image-container" :style="{ aspectRatio: galleryViewStore.defaultAspectRatioCollection }" > - - -
- -
diff --git a/frontend/src/stores/collections.ts b/frontend/src/stores/collections.ts index 25b4d2161..635dfd799 100644 --- a/frontend/src/stores/collections.ts +++ b/frontend/src/stores/collections.ts @@ -73,7 +73,13 @@ export default defineStore("collections", { isVirtualCollection( collection: Collection | VirtualCollection, ): collection is VirtualCollection { - return (collection as VirtualCollection).id !== undefined; + return ( + collection && + typeof collection === "object" && + "id" in collection && + "name" in collection && + "virtual" in collection + ); }, }, });