mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 18:05:55 +01:00
happy path tar import now works
This commit is contained in:
@@ -53,6 +53,10 @@ async function createNewNote(parentNoteId, noteData) {
|
||||
|
||||
const parentNote = await repository.getNote(parentNoteId);
|
||||
|
||||
if (!parentNote) {
|
||||
throw new Error(`Parent note ${parentNoteId} not found.`);
|
||||
}
|
||||
|
||||
if (!noteData.type) {
|
||||
if (parentNote.type === 'text' || parentNote.type === 'code') {
|
||||
noteData.type = parentNote.type;
|
||||
|
||||
Reference in New Issue
Block a user