Skip to content

Commit 6d20dc2

Browse files
author
Don McCurdy
committed
AnimationUtils: Clean up.
1 parent efbec79 commit 6d20dc2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/animation/AnimationUtils.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,13 @@ var AnimationUtils = {
183183

184184
clonedMesh.skeleton.bones = sourceBones.map( function ( sourceBone ) {
185185

186-
var clonedBone = cloneLookup.get( sourceBone );
187-
188-
if ( ! clonedBone ) {
186+
if ( ! cloneLookup.has( sourceBone ) ) {
189187

190188
throw new Error( 'THREE.AnimationUtils: Required bones are not descendants of the given object.' );
191189

192190
}
193191

194-
return clonedBone;
192+
return cloneLookup.get( sourceBone );
195193

196194
} );
197195

0 commit comments

Comments
 (0)