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

Protect Vector2 against the closure circular reference bug

Tristan VALCKE 9 лет назад
Родитель
Сommit
13b28e7012
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/math/Vector2.js

+ 2 - 2
src/math/Vector2.js

@@ -12,7 +12,7 @@ function Vector2( x, y ) {
 
 }
 
-Vector2.prototype = {
+Object.assign( Vector2.prototype, {
 
 	constructor: Vector2,
 
@@ -482,7 +482,7 @@ Vector2.prototype = {
 
 	}
 
-};
+} );
 
 
 export { Vector2 };

粤ICP备19079148号