diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index 891c8e43b56bcd789b0e3da6d9e3d6aaf3d5d21f..57ad3d1b34502f8fdeccdeaa48a9bbc5ccd2eb16 100644 --- a/src/renderers/WebGLRenderer.js +++ b/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 ) {