From 957c6592918c9fa7a999aeac6f448b93901c15ff Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Mon, 28 Jan 2019 13:09:51 +0100 Subject: [PATCH] Handle undefined graph and table results --- public/app/features/explore/GraphContainer.tsx | 5 +++++ public/app/features/explore/TableContainer.tsx | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/public/app/features/explore/GraphContainer.tsx b/public/app/features/explore/GraphContainer.tsx index e2610bcc781..c3a92f4007e 100644 --- a/public/app/features/explore/GraphContainer.tsx +++ b/public/app/features/explore/GraphContainer.tsx @@ -30,6 +30,11 @@ export class GraphContainer extends PureComponent { render() { const { exploreId, graphResult, loading, onChangeTime, showingGraph, showingTable, range, split } = this.props; const graphHeight = showingGraph && showingTable ? '200px' : '400px'; + + if (!graphResult) { + return null; + } + return ( { render() { const { loading, onClickCell, showingTable, tableResult } = this.props; + + if (!tableResult) { + return null; + } + return (