diff --git a/src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/metadataGroup/metadata-group.component.ts b/src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/metadataGroup/metadata-group.component.ts index be0fa271e19..1cd26d0f0a1 100644 --- a/src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/metadataGroup/metadata-group.component.ts +++ b/src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/metadataGroup/metadata-group.component.ts @@ -59,7 +59,7 @@ export abstract class MetadataGroupComponent extends RenderingTypeStructuredMode this.metadataGroup.forEach(mdg => { const entry = { field: mdg, - value: this.getMetadataValue(mdg, index) + value: this.getMetadataValue(mdg, index) || ' ' } as NestedMetadataGroupEntry; if (this.componentsToBeRenderedMap.has(index)) { const newEntries = [...this.componentsToBeRenderedMap.get(index), entry]; diff --git a/src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/rendering-type-value.model.ts b/src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/rendering-type-value.model.ts index 04c53e006a7..08190e4b254 100644 --- a/src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/rendering-type-value.model.ts +++ b/src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/rendering-type-value.model.ts @@ -38,6 +38,9 @@ export abstract class RenderingTypeValueModelComponent extends RenderingTypeMode * @param text */ formatText(text: string): string { + if (!text) { + return text; + } const newlineRegex = /\n/g; return text.replace(/>/g, '>').replace(/'); }