Parcourir la source

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

Harold Iedema il y a 7 ans
Parent
commit
e9a1146c60
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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 ) {