Skip to content

Commit edd8040

Browse files
committed
Set animation context only if window is available
1 parent e9a1146 commit edd8040

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/renderers/WebGLRenderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,8 @@ function WebGLRenderer( parameters ) {
10291029

10301030
var animation = new WebGLAnimation();
10311031
animation.setAnimationLoop( onAnimationFrame );
1032-
animation.setContext( typeof window !== 'undefined' ? window : null );
1032+
1033+
if ( typeof window !== 'undefined' ) animation.setContext( window );
10331034

10341035
this.setAnimationLoop = function ( callback ) {
10351036

0 commit comments

Comments
 (0)