fix broken template copy, closes #1724

This commit is contained in:
zadam 2021-03-09 20:51:57 +01:00
parent fba68681aa
commit a654078e56

View File

@ -61,7 +61,7 @@ eventService.subscribe(eventService.ENTITY_CREATED, ({ entityName, entity }) =>
const content = note.getContent();
if (!["text", "code"].includes(note.type)
if (["text", "code"].includes(note.type)
// if the note has already content we're not going to overwrite it with template's one
&& (!content || content.trim().length === 0)
&& templateNote.isStringNote()) {