Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
create note from API/import etc. should allow empty title, fixes #2530
zadamb90ba3d1a9ad
diff --git a/src/services/notes.js b/src/services/notes.jsindex c3afa563fc..c7cd68b3db 100644--- a/src/services/notes.js+++ b/src/services/notes.js@@ -102,8 +102,9 @@ function createNewNote(params) {throw new Error(`Parent note "${params.parentNoteId}" not found.`);}- if (!params.title || params.title.trim().length === 0) {- throw new Error(`Note title must not be empty`);+ if (params.title === null || params.title === undefined) {+ // empty title is allowed since it's possible to create such in the UI+ throw new Error(`Note title must be set`);}return sql.transactional(() => {