mirror of https://github.com/laurent22/joplin.git
Desktop: Fixes #2079: Do not crash when a notebook parent does not exist
parent
76ecfd0234
commit
45cca9e002
|
@ -121,6 +121,7 @@ class Folder extends BaseItem {
|
|||
let parentId = noteCount.folder_id;
|
||||
do {
|
||||
let folder = foldersById[parentId];
|
||||
if (!folder) break; // https://github.com/laurent22/joplin/issues/2079
|
||||
folder.note_count = (folder.note_count || 0) + noteCount.note_count;
|
||||
parentId = folder.parent_id;
|
||||
} while (parentId);
|
||||
|
|
Loading…
Reference in New Issue