diff --git a/apps/datahub/src/app/record/record-metadata/record-metadata.component.ts b/apps/datahub/src/app/record/record-metadata/record-metadata.component.ts index 23f69eed99..58d718ee5d 100644 --- a/apps/datahub/src/app/record/record-metadata/record-metadata.component.ts +++ b/apps/datahub/src/app/record/record-metadata/record-metadata.component.ts @@ -57,7 +57,14 @@ export class RecordMetadataComponent { thumbnailUrl$ = this.facade.metadata$.pipe( map((metadata) => { - return metadata?.overviews?.[0]?.url + // in order to differentiate between metadata not loaded yet + // and url not defined + // the content-ghost of image-overlay-preview relies on this differentiation + if (metadata?.overviews === undefined) { + return undefined + } else { + return metadata?.overviews?.[0]?.url ?? null + } }) ) diff --git a/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts b/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts index a324fe1742..24b67007df 100644 --- a/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts +++ b/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts @@ -34,6 +34,7 @@ export class Gn4MetadataMapper extends MetadataBaseMapper { useLimitations: [], spatialExtents: [], temporalExtents: [], + overviews: [], } const record: CatalogRecord = Object.keys(_source).reduce( (prev, fieldName) => diff --git a/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html b/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html index b6fb95eba8..932c405b23 100644 --- a/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +++ b/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html @@ -6,7 +6,7 @@