fix: transitType should be read when type is boardingPass (#137)

This commit is contained in:
Songkeys
2023-04-03 23:38:36 +08:00
parent 11cfe99ccc
commit e986fda63b

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;
}
}
}