Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AudioLoader: Fix uncaught DOMException in promise. #27237

Merged
merged 1 commit into from
Nov 23, 2023
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 23, 2023

Fixed #21754.

Description

Although the onError() callback is called when using AudioLoader.load(), there is still an uncaught DOMException of the returned promise. This can be reproduced with https://jsfiddle.net/DRL9/epnz47dj/1/.

The PR fixes the issue by implementing the error handling with the promise syntax.

@Mugen87 Mugen87 added this to the r159 milestone Nov 23, 2023
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
668.4 kB (165.8 kB) 668.4 kB (165.8 kB) +7 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
449.6 kB (108.9 kB) 449.6 kB (108.9 kB) +0 B
@Mugen87 Mugen87 changed the title AudioLoader: Fix uncaught DOMException in promise. Nov 23, 2023
@Mugen87 Mugen87 merged commit b87e54f into mrdoob:dev Nov 23, 2023
12 checks passed
AdaRoseCannon pushed a commit to AdaRoseCannon/three.js that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant