Create joints in WebXR controllers Hand Space when "hand" controller connected

I am working on a modified version of the three.js example with hand input and button presses. I am trying to create a hand attachment script that takes in an object and what joint to attach to, and makes the object a child of the right joint Group.

Link to the Glitch page with the project

attach( object, joint, handedness ) {
    const attachmentJoint = this.handSpace[handedness].joints[ joint ];
    
    // Issue here! Joints are not populated when controller connected
    // Joints populated only in the next controller update
    // Somehow wait till joints populated with object3d 
    // Or initialize inside some update loop - performance?

    if (attachmentJoint) {
      // Issue: Code doesn't reach this when called after controller connected!
      console.log(attachmentJoint);
      attachmentJoint.attach( object );
      return true;

    }
    
    return false;

  }

Does it make sense to expect the hand.joints to be populated as soon as the controller is connected?(in the case of hand tracking, as soon as the hands start getting tracked) Currently update inside WebXRController populates joints if they are undefined.

Should I create an issue for this on the GitHub repo under “Bug Report” or “Feature Request”? I already have some changes in mind for the modification along these lines inside WebXRController.js, for which I want to create an issue and submit an MR.

connect( inputSource ) {

		if ( inputSource && inputSource.hand ) {

			const hand = this._hand;

			if ( hand ) {

				for ( const inputjoint of inputSource.hand.values() ) {

					if ( hand.joints[ inputjoint.jointName ] === undefined ) {

						// The transform of this joint will be updated with the joint pose on each frame
						const joint = new Group();
						joint.matrixAutoUpdate = false;
						joint.visible = false;
						hand.joints[ inputjoint.jointName ] = joint;
						hand.add( joint );

					}

				}

			}

		}

		this.dispatchEvent( { type: 'connected', data: inputSource } );

		return this;

	}

[WebXR] WebXRController doesn’t initiate joints when controller connected · Issue #24826 · mrdoob/three.js (github.com)

I started an issue on Github, following it up there.