Skip to content
Snippets Groups Projects
Unverified Commit 848eea43 authored by Levente Pap's avatar Levente Pap Committed by GitHub
Browse files

Fix crashing local dashboard with explorer (#682)

parent ad45b495
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ import Row from "react-bootstrap/Row"; ...@@ -3,6 +3,7 @@ import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col"; import Col from "react-bootstrap/Col";
import {inject, observer} from "mobx-react"; import {inject, observer} from "mobx-react";
import {ExplorerStore} from "app/stores/ExplorerStore"; import {ExplorerStore} from "app/stores/ExplorerStore";
import {SyncBeaconPayload as beaconPayload} from "app/misc/Payload";
import ListGroup from "react-bootstrap/ListGroup"; import ListGroup from "react-bootstrap/ListGroup";
import * as dateformat from 'dateformat'; import * as dateformat from 'dateformat';
...@@ -16,6 +17,12 @@ export class SyncBeaconPayload extends React.Component<Props, any> { ...@@ -16,6 +17,12 @@ export class SyncBeaconPayload extends React.Component<Props, any> {
render() { render() {
let {payload} = this.props.explorerStore; let {payload} = this.props.explorerStore;
// TODO: this is just a quick fix. other payloads not having `sent_time` field causing a crash
// for example, when you open a data message and payload is not a sync beacon anymore, but react
// tries to rerender this component...
if (!(payload instanceof beaconPayload)) {
return []
}
return ( return (
payload && payload &&
<React.Fragment> <React.Fragment>
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment