Skip to content

Commit

Permalink
coverage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-kot committed Feb 21, 2024
1 parent 8ee435f commit 2f0d877
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/operations/items-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ export class ItemsTree<T> {
};

getChildren = (item: T): T[] => {
if (this.treeProps) {
return this.idToChildren.get(this.treeProps.getId(item)) ?? [];
}
return [];
return (this.treeProps && this.idToChildren.get(this.treeProps.getId(item))) ?? [];
};

getItems = (): ReadonlyArray<T> => {
Expand Down

0 comments on commit 2f0d877

Please sign in to comment.