Browse Source

Protect Material against the closure circular reference bug

Tristan VALCKE 8 years ago
parent
commit
97d2f96ce4
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/materials/Material.js

+ 2 - 3
src/materials/Material.js

@@ -63,7 +63,7 @@ function Material() {
 
 }
 
-Material.prototype = {
+Object.assign( Material.prototype, EventDispatcher.prototype, {
 
 	constructor: Material,
 
@@ -346,8 +346,7 @@ Material.prototype = {
 
 	}
 
-};
+} );
 
-Object.assign( Material.prototype, EventDispatcher.prototype );
 
 export { Material };