From a3bb05a036d8807177c7fc531aeba9f1fc23994a Mon Sep 17 00:00:00 2001 From: Richard Sustek Date: Tue, 10 Sep 2024 12:02:31 +0200 Subject: [PATCH] Fixes taxonomy_group --- lib/contracts/contracts.ts | 2 +- lib/mappers/element.mapper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/contracts/contracts.ts b/lib/contracts/contracts.ts index 02507667..ce88d028 100644 --- a/lib/contracts/contracts.ts +++ b/lib/contracts/contracts.ts @@ -67,7 +67,7 @@ export namespace Contracts { name: string; type: string; value: any; - taxonomy_group: string; + taxonomy_group?: string; } export interface IDateTimeElementContract extends IElementContract { diff --git a/lib/mappers/element.mapper.ts b/lib/mappers/element.mapper.ts index d0a8700a..a76b1fab 100644 --- a/lib/mappers/element.mapper.ts +++ b/lib/mappers/element.mapper.ts @@ -307,7 +307,7 @@ export class ElementMapper { private mapTaxonomyElement(elementWrapper: ElementModels.IElementWrapper): Elements.TaxonomyElement { return { ...this.buildElement(elementWrapper, ElementType.Taxonomy, () => elementWrapper.rawElement.value), - taxonomyGroup: elementWrapper.rawElement.taxonomy_group + taxonomyGroup: elementWrapper.rawElement.taxonomy_group ?? '' }; }