diff --git a/src/lib/vm-manager-hoc.jsx b/src/lib/vm-manager-hoc.jsx index 361210535df5d2ea376cf7cc97e3af3e1393a4b6..dbab2f5769dde20fa1a94fd59ceab10c1b73d2d5 100644 --- a/src/lib/vm-manager-hoc.jsx +++ b/src/lib/vm-manager-hoc.jsx @@ -25,7 +25,6 @@ const vmManagerHOC = function (WrappedComponent) { 'loadProject' ]); this.state = { - isStarted: false, loadingError: false, errorMessage: '' }; @@ -34,6 +33,8 @@ const vmManagerHOC = function (WrappedComponent) { if (this.props.vm.initialized) return; this.audioEngine = new AudioEngine(); this.props.vm.attachAudioEngine(this.audioEngine); + this.props.vm.setCompatibilityMode(true); + this.props.vm.start(); this.props.vm.initialized = true; } componentDidUpdate (prevProps) { @@ -44,11 +45,6 @@ const vmManagerHOC = function (WrappedComponent) { loadProject (projectData, projectState) { return this.props.vm.loadProject(projectData) .then(() => { - if (!this.state.isStarted) { - this.props.vm.setCompatibilityMode(true); - this.props.vm.start(); - this.setState({isStarted: true}); - } this.props.doneLoading(projectState); }) .catch(e => {