Browse Source

Protect EventDispatcher against the closure circular reference bug

Tristan VALCKE 8 năm trước cách đây
mục cha
commit
b9de3e2c6c
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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 };