mirror of
https://github.com/laurent22/joplin.git
synced 2025-04-14 11:18:47 +02:00
Cli: Fixes #2536: Fixed issue when a notebook does not have a parent
This commit is contained in:
parent
c5f1f11f2d
commit
3cf3cd1598
@ -40,7 +40,7 @@ class FolderListWidget extends ListWidget {
|
|||||||
let output = 0;
|
let output = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
const folder = BaseModel.byId(folders, folderId);
|
const folder = BaseModel.byId(folders, folderId);
|
||||||
if (!folder.parent_id) return output;
|
if (!folder || !folder.parent_id) return output;
|
||||||
output++;
|
output++;
|
||||||
folderId = folder.parent_id;
|
folderId = folder.parent_id;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user