Procházet zdrojové kódy

Don't use 'window' if it isn't available

Harold Iedema před 7 roky
rodič
revize
e9a1146c60
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/renderers/WebGLRenderer.js

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -1029,7 +1029,7 @@ function WebGLRenderer( parameters ) {
 
 	var animation = new WebGLAnimation();
 	animation.setAnimationLoop( onAnimationFrame );
-	animation.setContext( window );
+	animation.setContext( typeof window !== 'undefined' ? window : null );
 
 	this.setAnimationLoop = function ( callback ) {