diff --git a/embark-ui/src/containers/HomeContainer.js b/embark-ui/src/containers/HomeContainer.js index 7472d01e..e5e635e6 100644 --- a/embark-ui/src/containers/HomeContainer.js +++ b/embark-ui/src/containers/HomeContainer.js @@ -12,17 +12,25 @@ import {getProcesses, getCommands, getVersions, getProcessLogs} from "../reducer import deepEqual from 'deep-equal'; class HomeContainer extends Component { + componentDidMount() { + this.getProcesses(); + } + componentDidUpdate(prevProps) { if (!deepEqual(this.props.processes, prevProps.processes)) { - this.props.processes.forEach(process => { - this.props.fetchProcessLogs(process.name); - if (!prevProps.processes.length) { - this.props.listenToProcessLogs(process.name); - } - }); + this.getProcesses(prevProps); } } + getProcesses(prevProps) { + this.props.processes.forEach(process => { + this.props.fetchProcessLogs(process.name); + if (!prevProps || !prevProps.processes.length) { + this.props.listenToProcessLogs(process.name); + } + }); + } + render() { return (