Commit 00c71891 authored by Dorian Goepp's avatar Dorian Goepp

handle missing ROS for VideoStream

parent 16e5a62f
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment