diff --git a/src/services/notes.js b/src/services/notes.js index d74e96075..a025efab7 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.`); }