diff --git a/ui/src/logs/components/LogsTable.tsx b/ui/src/logs/components/LogsTable.tsx index decd96f4a..107b12152 100644 --- a/ui/src/logs/components/LogsTable.tsx +++ b/ui/src/logs/components/LogsTable.tsx @@ -89,13 +89,17 @@ class LogsTable extends Component { } public componentDidUpdate() { - if (this.grid) { - this.grid.recomputeGridSize() - } if (this.isTableEmpty) { return } - this.headerGrid.current.recomputeGridSize() + + if (this.grid) { + this.grid.recomputeGridSize() + } + + if (this.headerGrid.current) { + this.headerGrid.current.recomputeGridSize() + } } public componentDidMount() { @@ -103,7 +107,10 @@ class LogsTable extends Component { if (this.grid) { this.grid.recomputeGridSize() } - this.headerGrid.current.recomputeGridSize() + + if (this.headerGrid.current) { + this.headerGrid.current.recomputeGridSize() + } } public componentWillUnmount() {