소스 검색

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 ) {