Desktop: Fixes #2079: Do not crash when a notebook parent does not exist

pull/2115/head
Laurent Cozic 2019-11-12 17:50:48 +00:00
parent 76ecfd0234
commit 45cca9e002
1 changed files with 1 additions and 0 deletions

View File

@ -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);