소스 검색

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

Mugen87 4 년 전
부모
커밋
8295b0ea5f
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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();