Răsfoiți Sursa

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 ani în urmă
părinte
comite
2d7a63da57
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      src/animation/AnimationObjectGroup.js

+ 3 - 2
src/animation/AnimationObjectGroup.js

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

粤ICP备19079148号