Refactor for fun and profit

pull/632/head
Will Piers 2016-11-22 14:12:09 -07:00
parent 916b3484ae
commit 33ea32c8b2
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ export const HostPage = React.createClass({
},
componentDidMount() {
const {source, params} = this.props;
const {source, params, location} = this.props;
const hosts = {[params.hostID]: {name: params.hostID}};
// fetching layouts and mappings can be done at the same time
@ -44,7 +44,7 @@ export const HostPage = React.createClass({
getMeasurementsForHost(source, params.hostID).then((measurements) => {
const host = newHosts[this.props.params.hostID];
const filteredLayouts = layouts.filter((layout) => {
const focusedApp = this.props.location.query.app;
const focusedApp = location.query.app;
if (focusedApp) {
return layout.app === focusedApp;
}