Browse Source

Protect EventDispatcher against the closure circular reference bug

Tristan VALCKE 8 years ago
parent
commit
b9de3e2c6c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/EventDispatcher.js

+ 2 - 2
src/core/EventDispatcher.js

@@ -4,7 +4,7 @@
 
 function EventDispatcher() {}
 
-EventDispatcher.prototype = {
+Object.assign( EventDispatcher.prototype, {
 
 	addEventListener: function ( type, listener ) {
 
@@ -87,7 +87,7 @@ EventDispatcher.prototype = {
 
 	}
 
-};
+} );
 
 
 export { EventDispatcher };