Skip to content

Commit 8a9a106

Browse files
authored
Merge pull request #14249 from haroldiedema/worker-fix
Don't use 'window' if it isn't available
2 parents 483692b + edd8040 commit 8a9a106

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( window );
1032+
1033+
if ( typeof window !== 'undefined' ) animation.setContext( window );
10331034

10341035
this.setAnimationLoop = function ( callback ) {
10351036

0 commit comments

Comments
 (0)