mirror of
https://github.com/frappe/books.git
synced 2024-12-22 19:09:01 +00:00
fix: prevent undefined children from throwing error
This commit is contained in:
parent
f4e5f3d29b
commit
e65f69b5d5
@ -539,7 +539,9 @@ function pruneAccountTree(accountTree: AccountTree) {
|
||||
}
|
||||
|
||||
for (const root of Object.keys(accountTree)) {
|
||||
accountTree[root].children = getPrunedChildren(accountTree[root].children!);
|
||||
accountTree[root].children = getPrunedChildren(
|
||||
accountTree[root].children ?? []
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user