diff --git a/src/DCC.ts b/src/DCC.ts index 7bec22a4546ee683d6625d893acc7bd929cc504c..de8eb7c9a05f95c1458ea03533ce2facfc1951b8 100644 --- a/src/DCC.ts +++ b/src/DCC.ts @@ -1222,7 +1222,6 @@ export class ListType extends DCCXMLElement { // region choice list?: ListType[]; quantity?: QuantityType[]; - // endregion choice constructor(el: Partial<ListType> = {}) { @@ -1235,9 +1234,9 @@ export class ListType extends DCCXMLElement { if (el.dateTime) this.dateTime = new DCCXMLDate(el.dateTime); else if (el.dateTimeXMLList) this.dateTimeXMLList = new DCCXMLList(el.dateTimeXMLList); - // choice + // choice but maxOccurs = unbounded if (el.list) this.list = ensureArray(el.list).map((x) => new ListType(x)); - else if (el.quantity) this.quantity = ensureArray(el.quantity).map((x) => new QuantityType(x)); + if (el.quantity) this.quantity = ensureArray(el.quantity).map((x) => new QuantityType(x)); if (el.usedMethods) this.usedMethods = new UsedMethodListType(el.usedMethods); if (el.usedSoftware) this.usedSoftware = new SoftwareListType(el.usedSoftware);