Fix error when creating a case with no noteDetails

This commit is contained in:
Dragory 2019-04-14 13:26:55 +03:00
parent 434758b8ad
commit 338855de15

View file

@ -94,7 +94,7 @@ export class CasesPlugin extends ZeppelinPlugin<ICasesPluginConfig> {
pp_name: ppName, pp_name: ppName,
}); });
if (opts.reason || opts.noteDetails.length) { if (opts.reason || (opts.noteDetails && opts.noteDetails.length)) {
await this.createCaseNote(createdCase, opts.modId, opts.reason || "", opts.automatic, false, opts.noteDetails); await this.createCaseNote(createdCase, opts.modId, opts.reason || "", opts.automatic, false, opts.noteDetails);
} }