From 27f032c3fe91ad92e8c1c26d1f32588526e9b99d Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Mon, 21 Jun 2021 22:08:09 +0200 Subject: [PATCH] Moved initialization of _fields --- src/pass.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/pass.ts b/src/pass.ts index a15ed08..8f7602a 100644 --- a/src/pass.ts +++ b/src/pass.ts @@ -34,7 +34,13 @@ const propsSchemaMap = new Map>([ export class Pass { private bundle: Schemas.BundleUnit; private l10nBundles: Schemas.PartitionedBundle["l10nBundle"]; - private _fields: (keyof Schemas.PassFields)[]; + private _fields: (keyof Schemas.PassFields)[] = [ + "primaryFields", + "secondaryFields", + "auxiliaryFields", + "backFields", + "headerFields", + ]; private [passProps]: Schemas.ValidPass = {}; private type: keyof Schemas.ValidPassType; private fieldsKeys: Set = new Set(); @@ -149,13 +155,6 @@ export class Pass { this[transitType] = this.passCore[this.type]["transitType"]; } - this._fields = [ - "primaryFields", - "secondaryFields", - "auxiliaryFields", - "backFields", - "headerFields", - ]; this._fields.forEach((fieldName) => { this[fieldName] = new FieldsArray( this.fieldsKeys,