mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
options fixes
This commit is contained in:
@@ -114,14 +114,10 @@ function getAndValidateParent(params) {
|
||||
throw new Error(`Launchers should not have child notes.`);
|
||||
}
|
||||
|
||||
if (!params.ignoreForbiddenParents && ['lbRoot'].includes(parentNote.noteId)) {
|
||||
if (!params.ignoreForbiddenParents && (parentNote.isLaunchBarConfig() || parentNote.isOptions())) {
|
||||
throw new Error(`Creating child notes into '${parentNote.noteId}' is not allowed.`);
|
||||
}
|
||||
|
||||
if (['lbAvailableLaunchers', 'lbVisibleLaunchers'].includes(parentNote.noteId) && params.type !== 'launcher') {
|
||||
throw new Error(`Creating child notes into '${parentNote.noteId}' is only possible for type 'launcher'.`);
|
||||
}
|
||||
|
||||
return parentNote;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user