Merge pull request #138 from Songkeys/fix-transitType

fix: transitType should be read when type is boardingPass
This commit is contained in:
Alexander Cerutti
2023-04-03 21:17:56 +02:00
committed by GitHub

View File

@@ -556,6 +556,7 @@ export default class PKPass extends Bundle {
secondaryFields = [],
auxiliaryFields = [],
backFields = [],
transitType,
} = data[type] || {};
this.headerFields.push(...headerFields);
@@ -563,6 +564,9 @@ export default class PKPass extends Bundle {
this.secondaryFields.push(...secondaryFields);
this.auxiliaryFields.push(...auxiliaryFields);
this.backFields.push(...backFields);
if (this.type === "boardingPass") {
this.transitType = transitType;
}
}
}