From 8761dd924b9c0bb94238d206d99090be5df8961b Mon Sep 17 00:00:00 2001 From: Tristan VALCKE Date: Sun, 22 Jan 2017 16:49:37 +0100 Subject: [PATCH] Protect Object3D against the closure circular reference bug --- src/core/Object3D.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/Object3D.js b/src/core/Object3D.js index e667bcdc1d..46933b57c5 100644 --- a/src/core/Object3D.js +++ b/src/core/Object3D.js @@ -101,7 +101,7 @@ function Object3D() { Object3D.DefaultUp = new Vector3( 0, 1, 0 ); Object3D.DefaultMatrixAutoUpdate = true; -Object3D.prototype = { +Object.assign( Object3D.prototype, EventDispatcher.prototype, { constructor: Object3D, @@ -730,8 +730,7 @@ Object3D.prototype = { } -}; +} ); -Object.assign( Object3D.prototype, EventDispatcher.prototype ); export { Object3D }; -- GitLab