|
@@ -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();
|
|
|
|