mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 21:25:26 +00:00
Added existence check for readCertificates
This commit is contained in:
@@ -209,7 +209,7 @@ function getModelBufferContents(model: BundleUnit): PartitionedBundle {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async function readCertificatesFromOptions(options: Certificates): Promise<FinalCertificates> {
|
async function readCertificatesFromOptions(options: Certificates): Promise<FinalCertificates> {
|
||||||
if (!isValid(options, "certificatesSchema")) {
|
if (!(options && Object.keys(options).length && isValid(options, "certificatesSchema"))) {
|
||||||
throw new Error("Unable to create Pass: certificates schema validation failed.");
|
throw new Error("Unable to create Pass: certificates schema validation failed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user