Fix logic for featured image (#1580)

This commit is contained in:
Mysterious_Dev 2024-01-18 17:55:52 +01:00 committed by GitHub
parent c13777e68d
commit d2f189607e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 12 deletions

View File

@ -168,12 +168,7 @@
:key="project.id"
:name="project.name"
:display="cosmetics.searchDisplayMode.user"
:featured-image="
project.gallery
.slice()
.sort((a, b) => b.featured - a.featured)
.map((x) => x.url)[0]
"
:featured-image="project.gallery.find((element) => element.featured)?.url"
project-type-url="project"
:description="project.summary"
:created-at="project.published"

View File

@ -237,12 +237,7 @@
:key="project.id"
:name="project.title"
:display="cosmetics.searchDisplayMode.user"
:featured-image="
project.gallery
.slice()
.sort((a, b) => b.featured - a.featured)
.map((x) => x.url)[0]
"
:featured-image="project.gallery.find((element) => element.featured)?.url"
:description="project.description"
:created-at="project.published"
:updated-at="project.updated"