From f5e043b8b1e434c4683b291aea9eb57cc2e1b945 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 19 Sep 2020 17:30:58 +0200 Subject: [PATCH] NoteEntity: Always initialize arrays The `create()` function did not initialize all arrays, which caused them to be `undefined` instead of empty. Signed-off-by: David Mehren --- src/notes/note.entity.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/notes/note.entity.ts b/src/notes/note.entity.ts index 70e828738..b89539e17 100644 --- a/src/notes/note.entity.ts +++ b/src/notes/note.entity.ts @@ -71,6 +71,9 @@ export class Note { newNote.alias = alias; newNote.viewcount = 0; newNote.owner = owner; + newNote.authorColors = []; + newNote.userPermissions = []; + newNote.groupPermissions = []; return newNote; } }