Преглед на файлове

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

Harold Iedema преди 7 години
родител
ревизия
e9a1146c60
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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 ) {