fix duplicate subtree

This commit is contained in:
zadam
2021-10-02 23:26:18 +02:00
parent 8c2a5d19f2
commit e4a483aefe
7 changed files with 128 additions and 101 deletions

View File

@@ -91,13 +91,6 @@ class NoteContext extends Component {
}
async getResolvedNotePath(inputNotePath) {
const noteId = treeService.getNoteIdFromNotePath(inputNotePath);
if ((await froca.getNote(noteId)).isDeleted) {
// no point in trying to resolve canonical notePath
return inputNotePath;
}
const resolvedNotePath = await treeService.resolveNotePath(inputNotePath, this.hoistedNoteId);
if (!resolvedNotePath) {
@@ -113,9 +106,6 @@ class NoteContext extends Component {
return; // note is outside of hoisted subtree and user chose not to unhoist
}
// if user choise to unhoist, cache was reloaded, but might not contain this note (since it's on unexpanded path)
await froca.getNote(noteId);
return resolvedNotePath;
}