Cli: Fixes #2536: Fixed issue when a notebook does not have a parent

This commit is contained in:
Laurent Cozic committed 2020-02-21 18:01:15 +00:00
1 parent c5f1f11f2d
commit 3cf3cd1598
1 file changed
+1 -1
+1 -1
View File
@@ -40,7 +40,7 @@ class FolderListWidget extends ListWidget {
let output = 0;
while (true) {
const folder = BaseModel.byId(folders, folderId);
if (!folder.parent_id) return output;
if (!folder || !folder.parent_id) return output;
output++;
folderId = folder.parent_id;
}