correct placement of imported root note (at the end)

This commit is contained in:
zadam 2021-02-16 23:38:05 +01:00
parent f49f510459
commit d905335935

View file

@ -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(),
}));