Просмотр исходного кода

Protect EventDispatcher against the closure circular reference bug

Tristan VALCKE 8 лет назад
Родитель
Сommit
b9de3e2c6c
1 измененных файлов с 2 добавлено и 2 удалено
  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 };