From 338855de156c5d3ac74adf79710da9cfcd3a7d42 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); }