From e408f710690bc7ec6e50373eec3ddc71a74582b9 Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Wed, 13 Oct 2021 22:48:42 +0200 Subject: [PATCH] Fixed PKPass.from errors --- src/PKPass.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PKPass.ts b/src/PKPass.ts index 7fb5ee0..814efe8 100644 --- a/src/PKPass.ts +++ b/src/PKPass.ts @@ -38,7 +38,7 @@ export default class PKPass extends Bundle { static async from( source: S, - additionalProps: S extends PKPass + additionalProps?: S extends PKPass ? Schemas.OverridablePassProps : never, ): Promise { @@ -81,7 +81,7 @@ export default class PKPass extends Bundle { buffers = await getModelFolderContents(source.model); certificates = source.certificates; - props = Schemas.validate(Schemas.OverridablePassProps, props); + props = Schemas.validate(Schemas.OverridablePassProps, source.props); } if (additionalProps && Object.keys(additionalProps).length) {