This commit is contained in:
Dániel Péter Sipos
2020-10-29 14:57:09 +01:00
parent 9a1b21aeef
commit 22fe184142

View File

@@ -36,6 +36,9 @@ export class GridThumbnailComponent implements OnInit, OnChanges {
event.currentTarget.src = this.defaultImage; event.currentTarget.src = this.defaultImage;
} }
/**
* Initialize the src
*/
ngOnInit(): void { ngOnInit(): void {
this.src = this.defaultImage; this.src = this.defaultImage;
@@ -51,6 +54,9 @@ export class GridThumbnailComponent implements OnInit, OnChanges {
} }
} }
/**
* check if the Bitstream has any content than set the src
*/
checkThumbnail(thumbnail: Bitstream) { checkThumbnail(thumbnail: Bitstream) {
if ( if (
hasValue(thumbnail) && hasValue(thumbnail) &&