Explorar el Código

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 hace 9 años
padre
commit
2d7a63da57
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      src/animation/AnimationObjectGroup.js

+ 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号