improvements

This commit is contained in:
zadam
2022-12-06 23:48:44 +01:00
parent b9632a7814
commit 5fc9f5f3f9
22 changed files with 81 additions and 73 deletions

View File

@@ -114,11 +114,11 @@ function getAndValidateParent(params) {
throw new Error(`Launchers should not have child notes.`);
}
if (!params.ignoreForbiddenParents && ['lb_root'].includes(parentNote.noteId)) {
if (!params.ignoreForbiddenParents && ['lbRoot'].includes(parentNote.noteId)) {
throw new Error(`Creating child notes into '${parentNote.noteId}' is not allowed.`);
}
if (['lb_availablelaunchers', 'lb_visiblelaunchers'].includes(parentNote.noteId) && params.type !== 'launcher') {
if (['lbAvailableLaunchers', 'lbVisibleLaunchers'].includes(parentNote.noteId) && params.type !== 'launcher') {
throw new Error(`Creating child notes into '${parentNote.noteId}' is only possible for type 'launcher'.`);
}