soto: call resetControllers on mount

This commit is contained in:
Matilde Park 2020-09-14 14:36:57 -04:00
parent 36202d8463
commit 3482f4ae59

View File

@ -20,7 +20,7 @@ export default class DojoApp extends Component {
this.store.setStateHandler(this.setState.bind(this));
this.state = this.store.state;
this.resetControllers();
this.resetControllers = this.resetControllers.bind(this);
}
resetControllers() {
@ -29,6 +29,7 @@ export default class DojoApp extends Component {
}
componentDidMount() {
this.resetControllers();
const channel = new window.channel();
this.api = new Api(this.props.ship, channel);
this.store.api = this.api;