Skip to content

Commit f8976e6

Browse files
authoredJan 22, 2025··
fix: Use default collection thumbnail if selected (#2331)
Fixes issue where collection thumbnail is always the screenshot, even if a Browsertrix provided default thumbnail is selected after choosing the screenshot.
1 parent 28d39d8 commit f8976e6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎frontend/src/features/collections/collections-grid.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ export class CollectionsGrid extends BtrixElement {
7171
>
7272
<btrix-collection-thumbnail
7373
src=${ifDefined(
74-
collection.thumbnail?.path ||
75-
Object.entries(CollectionThumbnail.Variants).find(
76-
([name]) => name === collection.defaultThumbnailName,
77-
)?.[1].path,
74+
Object.entries(CollectionThumbnail.Variants).find(
75+
([name]) => name === collection.defaultThumbnailName,
76+
)?.[1].path || collection.thumbnail?.path,
7877
)}
7978
></btrix-collection-thumbnail>
8079
${this.renderDateBadge(collection)}

0 commit comments

Comments
 (0)
Please sign in to comment.