diff --git a/src/Board.js b/src/Board.js index e84adab1ed87f744072fa5b93da81487aa95e6d7..32df3fc2b76742ec06b3118f33117e43a966ae37 100755 --- a/src/Board.js +++ b/src/Board.js @@ -5,12 +5,12 @@ import FlexLayout, {Actions} from "flexlayout-react"; import {decorate, observable} from "mobx" // The React Components that are going into tabs import {VideoStream, DemoVideoStream} from "./VideoStream" -import { RosLineChart, DemoLineChart } from "./LineChart" -import { RosHGauge } from "./HorizontalGauge" -import { RosMemoryRanked, DemoMemoryRanked } from './MemoryRanked' -import { RosInteractionTrace, DemoInteractionTrace } from './InteractionTrace' -import { RosLatestInteraction, DemoLatestInteraction } from './LatestInteraction' -import { RosMood, DemoMood } from './Mood' +import {RosLineChart, DemoLineChart} from "./LineChart" +import {RosHGauge} from "./HorizontalGauge" +import {RosMemoryRanked, DemoMemoryRanked} from './MemoryRanked' +import {RosInteractionTrace, DemoInteractionTrace} from './InteractionTrace' +import {RosLatestInteraction, DemoLatestInteraction} from './LatestInteraction' +import {RosMood, DemoMood} from './Mood' import DemoString from './String' // get the default configuration for the layout diff --git a/src/VideoStream/index.js b/src/VideoStream/index.js index 905a480f9fd66c7b059e22d57401e855c7fc3d73..1bdcea11e145ca67a4e6c0f3280875c0a1aec1d4 100644 --- a/src/VideoStream/index.js +++ b/src/VideoStream/index.js @@ -13,11 +13,13 @@ class VideoStream extends Component { url: hasUrl ? this.props.url : this.defaultImage }; - this.props.ros.getTopics(function(infos){ - if (undefined !== infos.topics.find(elem => elem === this.topic)) { - this.setState({url: 'http://localhost:8081/stream?topic=' + this.topic}); - } - }.bind(this)) + if (this.props.ros) { + this.props.ros.getTopics(function(infos){ + if (undefined !== infos.topics.find(elem => elem === this.topic)) { + this.setState({url: 'http://localhost:8081/stream?topic=' + this.topic}); + } + }.bind(this)) + } } handleSettingsChange(event) {