diff --git a/priv/frontend/src/components/App.js b/priv/frontend/src/components/App.js index 6f5dffa..e6aeb02 100644 --- a/priv/frontend/src/components/App.js +++ b/priv/frontend/src/components/App.js @@ -25,7 +25,14 @@ export default class App extends Component { } subscribeToChannels () { + if (this.state.metrics == null) { + // fetching state failed, bail + log('not going to subscribe to realtime updates due to fetch failure') + return + } + const { graph } = this.state.metrics + const channels = Object.keys(graph).reduce( (channels, name) => [...channels, `latency:${name}`, `status:${name}`], []