diff --git a/ts/smartacme.classes.cert.ts b/ts/smartacme.classes.cert.ts index e0f7911..1d70b6c 100644 --- a/ts/smartacme.classes.cert.ts +++ b/ts/smartacme.classes.cert.ts @@ -31,8 +31,10 @@ export class Cert extends plugins.smartdata.SmartDataDbDoc implements inte constructor(optionsArg: ICert) { super(); - Object.keys(optionsArg).forEach(key => { - this[key] = optionsArg[key]; - }); + if (optionsArg) { + Object.keys(optionsArg).forEach(key => { + this[key] = optionsArg[key]; + }); + } } }