Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bitECS: Prevent Three.js Audio.disconnect error
**Problem** Disconnecting Three.js Audio can cause an error #6206 Three.js Audio.disconnect() seems to expect Audio.source is non-null. Audio.source is set via .set*Source() or .play(). https://github.com/MozillaReality/three.js/blob/hubs-patches-141/src/audio/Audio.js Hubs Client seems to call Audio.disconnect() before setting source in some scenarios. **Solution** Add a guard to check Audio.source is non-null before calling Audio.disconnect() **Additional context** There might be a chance that the fact Audio.source keeps being unset in some scenarios might be a bug. We might also need to investigate it.
- Loading branch information