Skip to content

Commit

Permalink
Fix flickering in ThumbnailComponent [build]
Browse files Browse the repository at this point in the history
  • Loading branch information
tkleinke committed Feb 21, 2025
1 parent 6f773c0 commit 08cb893
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ export class ThumbnailComponent implements OnChanges {

private async updateThumbnailUrl() {

this.thumbnailUrl = undefined;

const relationTargets: string[] = this.resource.relations.isDepictedIn;
if (!relationTargets || relationTargets.length === 0) return undefined;
if (!relationTargets || relationTargets.length === 0) {
this.thumbnailUrl = undefined;
}

try {
this.thumbnailUrl = await this.imageUrlMaker.getUrl(relationTargets[0], ImageVariant.THUMBNAIL);
this.thumbnailPlaceholderCategory = undefined;
} catch (err) {
this.thumbnailUrl = undefined;
this.updateThumbnailPlaceholder(relationTargets);
}

Expand Down

0 comments on commit 08cb893

Please sign in to comment.