From b74a6d55d6f50766dfd3eb05ffe97e6feee40eb8 Mon Sep 17 00:00:00 2001 From: Dragory Date: Sun, 14 Apr 2019 13:26:55 +0300 Subject: [PATCH] Fix error when creating a case with no noteDetails --- src/plugins/Cases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/Cases.ts b/src/plugins/Cases.ts index eb3ed3e0..bb12d400 100644 --- a/src/plugins/Cases.ts +++ b/src/plugins/Cases.ts @@ -94,7 +94,7 @@ export class CasesPlugin extends ZeppelinPlugin { 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); }