Browse Source

Protect Vector2 against the closure circular reference bug

Tristan VALCKE 8 years ago
parent
commit
13b28e7012
1 changed files with 2 additions and 2 deletions
  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 };