From b89b5beb1b30d20a405cf7d9a79070c5a3ed700f Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 17 Feb 2021 16:14:39 +0100 Subject: [PATCH] fix(cli): handle error properly --- cli/iot/generateCAIntermediate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/iot/generateCAIntermediate.ts b/cli/iot/generateCAIntermediate.ts index 63dd11048..549abc080 100644 --- a/cli/iot/generateCAIntermediate.ts +++ b/cli/iot/generateCAIntermediate.ts @@ -47,7 +47,7 @@ export const generateCAIntermediate = async (args: { serviceCertificate: rootCert, }, (err, cert) => { - if (err !== undefined) return reject(err) + if (err !== undefined && err !== null) return reject(err) resolve(cert) }, ),