Kaynağa Gözat

Protect Vector2 against the closure circular reference bug

Tristan VALCKE 9 yıl önce
ebeveyn
işleme
13b28e7012
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  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 };