Skip to content

Commit

Permalink
fix(Operation/Job/Statistics): handle undefined [YTFRONT-4300]
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-efremoff committed Aug 12, 2024
1 parent 861f57c commit ca0da3c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ export function prepareMetricsTree(statistics: StatisticTree): StatisticTreeInne
return metricsTree[TREE_ROOT_NAME];
}

export function filterStatisticTree(tree: StatisticTreeInner, currentFilter = '') {
export function filterStatisticTree(tree?: StatisticTreeInner, currentFilter = '') {
if (!tree) {
return [];
}

const filteredTree = hammer.treeList.filterTree(
tree,
(entry: MetricsEntry) => entry.name.indexOf(currentFilter) !== -1,
Expand Down

0 comments on commit ca0da3c

Please # to comment.