From d9053359356ed138be1294ce3c4a6a8f495224b2 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 16 Feb 2021 23:38:05 +0100 Subject: [PATCH] correct placement of imported root note (at the end) --- src/services/import/zip.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/import/zip.js b/src/services/import/zip.js index 4625af84f..1889b2708 100644 --- a/src/services/import/zip.js +++ b/src/services/import/zip.js @@ -355,7 +355,9 @@ async function importZip(taskContext, fileBuffer, importRootNote) { mime, prefix: noteMeta ? noteMeta.prefix : '', isExpanded: noteMeta ? noteMeta.isExpanded : false, - notePosition: noteMeta ? noteMeta.notePosition : false, + // root notePosition should be ignored since it relates to original document + // now import root should be placed after existing notes into new parent + notePosition: (noteMeta && firstNote) ? noteMeta.notePosition : undefined, isProtected: importRootNote.isProtected && protectedSessionService.isProtectedSessionAvailable(), }));