Fixed wrong variables, added initialization

This commit is contained in:
Alexander Cerutti
2019-06-09 23:41:20 +02:00
parent 85e9f63907
commit 79a55f64d4
2 changed files with 11 additions and 11 deletions

View File

@@ -30,10 +30,10 @@ export class Pass implements PassIndexSignature {
private bundle: schema.BundleUnit;
private l10nBundles: schema.PartitionedBundle["l10nBundle"];
private _fields: string[];
private _props: schema.ValidPass;
private type: string;
private fieldsKeys: Set<string>;
private passCore: schema.ValidPass;
private _props: schema.ValidPass = {};
private type: string = "";
private fieldsKeys: Set<string> = new Set<string>();
private passCore: schema.ValidPass = {};
Certificates: schema.FinalCertificates;
l10nTranslations: { [key: string]: { [key: string]: string } } = {};
@@ -61,8 +61,6 @@ export class Pass implements PassIndexSignature {
this[transitType] = this.passCore[this.type]["transitType"];
}
this.fieldsKeys = new Set();
const typeFields = Object.keys(this.passCore[this.type]);
this._fields = ["primaryFields", "secondaryFields", "auxiliaryFields", "backFields", "headerFields"];
@@ -142,7 +140,7 @@ export class Pass implements PassIndexSignature {
let hashFlow = forge.md.sha1.create();
hashFlow.update(finalBundle[current].toString("binary"));
archive.append(current, { name: current });
archive.append(finalBundle[current], { name: current });
acc[current] = hashFlow.digest().toHex();