diff --git a/src/lib/font-loader-hoc.jsx b/src/lib/font-loader-hoc.jsx index 22193f3a9554df4cbe0336983c62a37eb10d3112..cbb7856c31fb3c95c3e8990d41e2cbd21922330f 100644 --- a/src/lib/font-loader-hoc.jsx +++ b/src/lib/font-loader-hoc.jsx @@ -45,15 +45,10 @@ const FontLoaderHOC = function (WrappedComponent) { } } render () { - const { - /* eslint-disable no-unused-vars */ - /* eslint-enable no-unused-vars */ - ...componentProps - } = this.props; return ( <WrappedComponent fontsLoaded={this.state.fontsLoaded} - {...componentProps} + {...this.props} /> ); } diff --git a/src/lib/vm-manager-hoc.jsx b/src/lib/vm-manager-hoc.jsx index 251670dd87fb97668a6a1e0961768e02cb765cb1..56bd7eabf74ddee9a6f0f714b9b12a25a45ef2f0 100644 --- a/src/lib/vm-manager-hoc.jsx +++ b/src/lib/vm-manager-hoc.jsx @@ -5,10 +5,6 @@ import {connect} from 'react-redux'; import VM from 'scratch-vm'; import AudioEngine from 'scratch-audio'; -import Renderer from 'scratch-render'; -import VideoProvider from '../lib/video/video-provider'; -import {SVGRenderer as V2SVGAdapter} from 'scratch-svg-renderer'; -import {BitmapAdapter as V2BitmapAdapter} from 'scratch-svg-renderer'; import { LoadingStates, @@ -42,8 +38,8 @@ const vmManagerHOC = function (WrappedComponent) { this.props.vm.initialized = true; } componentDidUpdate (prevProps) { - // if project state is LOADING variation, and fonts are loaded, - // and that wasn't true until now, load project + // if project is in loading state, AND fonts are loaded, + // and they weren't both that way until now... load project! if (this.props.isLoadingWithId && this.props.fontsLoaded && (!prevProps.isLoadingWithId || !prevProps.fontsLoaded)) { this.loadProject(this.props.projectData, this.props.loadingState);