1
0
Эх сурвалжийг харах

Declare variable in local scope instead of in else if statement, due to warning about uninitialized variable l.156, and set it to undefined to keep code compatibility

Tristan VALCKE 9 жил өмнө
parent
commit
2d7a63da57

+ 3 - 2
src/animation/AnimationObjectGroup.js

@@ -92,7 +92,8 @@ AnimationObjectGroup.prototype = {
 
 
 			var object = arguments[ i ],
 			var object = arguments[ i ],
 				uuid = object.uuid,
 				uuid = object.uuid,
-				index = indicesByUUID[ uuid ];
+				index = indicesByUUID[ uuid ],
+				knownObject = undefined;
 
 
 			if ( index === undefined ) {
 			if ( index === undefined ) {
 
 
@@ -114,7 +115,7 @@ AnimationObjectGroup.prototype = {
 
 
 			} else if ( index < nCachedObjects ) {
 			} else if ( index < nCachedObjects ) {
 
 
-				var knownObject = objects[ index ];
+				knownObject = objects[ index ];
 
 
 				// move existing object to the ACTIVE region
 				// move existing object to the ACTIVE region
 
 

粤ICP备19079148号