root 2 years ago
parent
commit
a4b3867efa
1 changed files with 22 additions and 22 deletions
  1. 22 22
      src/components/App.tsx

+ 22 - 22
src/components/App.tsx

@@ -848,30 +848,30 @@ class App extends React.Component<AppProps, AppState> {
       process.env.NODE_ENV === ENV.TEST ||
       process.env.NODE_ENV === ENV.TEST ||
       process.env.NODE_ENV === ENV.DEVELOPMENT
       process.env.NODE_ENV === ENV.DEVELOPMENT
     ) {
     ) {
-      const setState = this.setState.bind(this);
-      Object.defineProperties(window.h, {
-        state: {
-          configurable: true,
-          get: () => {
-            return this.state;
-          },
-        },
-        setState: {
-          configurable: true,
-          value: (...args: Parameters<typeof setState>) => {
-            return this.setState(...args);
-          },
-        },
-        app: {
-          configurable: true,
-          value: this,
+    }
+    const setState = this.setState.bind(this);
+    Object.defineProperties(window.h, {
+      state: {
+        configurable: true,
+        get: () => {
+          return this.state;
         },
         },
-        history: {
-          configurable: true,
-          value: this.history,
+      },
+      setState: {
+        configurable: true,
+        value: (...args: Parameters<typeof setState>) => {
+          return this.setState(...args);
         },
         },
-      });
-    }
+      },
+      app: {
+        configurable: true,
+        value: this,
+      },
+      history: {
+        configurable: true,
+        value: this.history,
+      },
+    });
 
 
     this.scene.addCallback(this.onSceneUpdated);
     this.scene.addCallback(this.onSceneUpdated);
     this.addEventListeners();
     this.addEventListeners();