Not falling back to root node and getting null breaks animation

Hi, I track down a problem to this commit:

It removes a “||” case and returns null sometimes.

I cannot tell the reason for it but it breaks an animation that used to work.

The relevant code is here:

It loads idling, walking and running animation in glb, and use it to animate the Ready Player Me avatars. Now the targetNode on line 426 can be null, the following check fails.

At this moment I don’t know what problem it was causing, but it looks like the fix was not innocuous.