delete note fixes

This commit is contained in:
zadam
2021-05-08 23:31:20 +02:00
parent 84246fd197
commit 9afea492db
9 changed files with 46 additions and 45 deletions

View File

@@ -113,13 +113,13 @@ function getSomeNotePathSegments(note, hoistedNotePath = 'root') {
const notePaths = note.getSortedNotePaths(hoistedNotePath);
return notePaths[0].notePath;
return notePaths.length > 0 ? notePaths[0].notePath : null;
}
function getSomeNotePath(note, hoistedNotePath = 'root') {
const notePath = getSomeNotePathSegments(note, hoistedNotePath);
return notePath.join('/');
return notePath === null ? null : notePath.join('/');
}
async function sortAlphabetically(noteId) {