From d41c661f63bfc64ac4026ed0203b0f8af42fd5e6 Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Fri, 18 Oct 2024 20:18:40 +0200 Subject: [PATCH] Added initialization of additionalInfoField only if we are on an eventTicket --- src/PKPass.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/PKPass.ts b/src/PKPass.ts index 8140090..fe5f1d8 100644 --- a/src/PKPass.ts +++ b/src/PKPass.ts @@ -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); + } } }