Procházet zdrojové kódy

AnimationObjectGroup: Fix uncache() when used with a single object.

Mugen87 před 4 roky
rodič
revize
8295b0ea5f
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 6 1
      src/animation/AnimationObjectGroup.js

+ 6 - 1
src/animation/AnimationObjectGroup.js

@@ -281,7 +281,12 @@ Object.assign( AnimationObjectGroup.prototype, {
 					const lastIndex = -- nObjects,
 						lastObject = objects[ lastIndex ];
 
-					indicesByUUID[ lastObject.uuid ] = index;
+					if ( lastIndex > 0 ) {
+
+						indicesByUUID[ lastObject.uuid ] = index;
+
+					}
+
 					objects[ index ] = lastObject;
 					objects.pop();