Added initialization of additionalInfoField only if we are on an eventTicket

This commit is contained in:
Alexander Cerutti
2024-10-18 20:18:40 +02:00
parent f58ee7f534
commit d41c661f63

View File

@@ -360,7 +360,8 @@ export default class PKPass extends Bundle {
}
/**
* Allows accessing to backFields object
* Allows accessing to new iOS 18
* event ticket additional fields
*
* @throws (automatically) if no valid pass.json
* has been parsed yet or, anyway, if current
@@ -614,11 +615,14 @@ export default class PKPass extends Bundle {
this.secondaryFields.push(...secondaryFields);
this.auxiliaryFields.push(...auxiliaryFields);
this.backFields.push(...backFields);
this.additionalInfoFields.push(...additionalInfoFields);
if (this.type === "boardingPass") {
this.transitType = transitType;
}
if (this.type === "eventTicket") {
this.additionalInfoFields.push(...additionalInfoFields);
}
}
}