2
0
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:
18alantom 2022-07-26 19:12:52 +05:30
parent f4e5f3d29b
commit e65f69b5d5

View File

@ -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 ?? []
);
}
}