Browse Source

Make sure variable isn't redeclared every new object

https://lgtm.com/projects/g/mrdoob/three.js/snapshot/32fd13b241a1001af0045c3263d17dc2e133f482/files/src/animation/AnimationObjectGroup.js?sort=name&dir=ASC&mode=heatmap&excluded=false#xf94deba613c6f9ba:1
gero3 7 years ago
parent
commit
8e35b9e7c4
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/animation/AnimationObjectGroup.js

+ 4 - 3
src/animation/AnimationObjectGroup.js

@@ -95,14 +95,15 @@ Object.assign( AnimationObjectGroup.prototype, {
 			paths = this._paths,
 			parsedPaths = this._parsedPaths,
 			bindings = this._bindings,
-			nBindings = bindings.length;
+			nBindings = bindings.length,
+		    	knownObject = undefined;;
 
 		for ( var i = 0, n = arguments.length; i !== n; ++ i ) {
 
 			var object = arguments[ i ],
 				uuid = object.uuid,
-				index = indicesByUUID[ uuid ],
-				knownObject = undefined;
+				index = indicesByUUID[ uuid ];
+				
 
 			if ( index === undefined ) {