feat(template): duplicate content for canvas

This commit is contained in:
Elian Doran 2025-03-08 04:24:09 +02:00
parent c7b99adb6a
commit 5d9bea8987
No known key found for this signature in database

View File

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