Browse Source

Protect WebGLRenderTarget against the closure circular reference bug

Tristan VALCKE 8 years ago
parent
commit
bc13d83f63
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/renderers/WebGLRenderTarget.js

+ 2 - 3
src/renderers/WebGLRenderTarget.js

@@ -39,7 +39,7 @@ function WebGLRenderTarget( width, height, options ) {
 
 }
 
-WebGLRenderTarget.prototype = {
+Object.assign( WebGLRenderTarget.prototype, EventDispatcher.prototype, {
 
 	constructor: WebGLRenderTarget,
 
@@ -90,8 +90,7 @@ WebGLRenderTarget.prototype = {
 
 	}
 
-};
+} );
 
-Object.assign( WebGLRenderTarget.prototype, EventDispatcher.prototype );
 
 export { WebGLRenderTarget };