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
can't create non-launcher notes into the launcher subtree
zadamdb6dbc782111
diff --git a/src/services/notes.js b/src/services/notes.jsindex d74e96075e..a025efab7d 100644--- a/src/services/notes.js+++ b/src/services/notes.js@@ -104,6 +104,10 @@ function getAndValidateParent(params) {throw new ValidationError(`Creating child notes into launcher notes is not allowed.`);}+ if (['lbAvailableLaunchers', 'lbVisibleLaunchers'].includes(params.parentNoteId) && params.type !== 'launcher') {+ throw new ValidationError(`Only 'launcher' notes can be created in parent '${params.parentNoteId}'`);+ }+if (!params.ignoreForbiddenParents && (['lbRoot', 'hidden'].includes(parentNote.noteId) || parentNote.isOptions())) {throw new ValidationError(`Creating child notes into '${parentNote.noteId}' is not allowed.`);}