From 5651ce69a5b933cdc4cd7de4c86e3a0d0ebd9b3d Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Sun, 14 Nov 2021 00:47:37 +0100 Subject: [PATCH] Added constructor check on certificates to avoid an error if a pass is created using PKPass.from, without specifying the certificates --- src/PKPass.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PKPass.ts b/src/PKPass.ts index 8cc9ca7..6e95893 100644 --- a/src/PKPass.ts +++ b/src/PKPass.ts @@ -157,7 +157,9 @@ export default class PKPass extends Bundle { Object.assign(this[propsSymbol], overridesValidation); } - this.certificates = certificates; + if (certificates) { + this.certificates = certificates; + } } /**