Skip to content

Commit

Permalink
Charts: Tree: Fixed test throws exception when this.dataframe is nu…
Browse files Browse the repository at this point in the history
…ll in `_render()` in `then`
  • Loading branch information
LaykDimon committed Oct 28, 2024
1 parent 719efcb commit f93007e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/Charts/src/viewers/tree/tree-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ export class TreeViewer extends EChartViewer {
}

async _render() {
if (!this.dataFrame)
return;

if (this.hierarchyColumnNames?.some((colName) => !this.dataFrame.columns.names().includes(colName)))
this.hierarchyColumnNames = this.hierarchyColumnNames.filter((value) => this.dataFrame.columns.names().includes(value));
if (this.hierarchyColumnNames == null || this.hierarchyColumnNames.length === 0)
Expand Down

0 comments on commit f93007e

Please sign in to comment.