From 70f0826ad6e255e822f6f5ba32ad29ba7f16c2d4 Mon Sep 17 00:00:00 2001
From: Ben Wheeler <wheeler.benjamin@gmail.com>
Date: Tue, 16 Oct 2018 15:02:44 -0400
Subject: [PATCH] cleaned up vm cruft

---
 src/lib/font-loader-hoc.jsx | 7 +------
 src/lib/vm-manager-hoc.jsx  | 8 ++------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/lib/font-loader-hoc.jsx b/src/lib/font-loader-hoc.jsx
index 22193f3a9..cbb7856c3 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 251670dd8..56bd7eabf 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);
-- 
GitLab