mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
can't create non-launcher notes into the launcher subtree
This commit is contained in:
parent
e5171e434b
commit
db6dbc7821
@ -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.`);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user