Skip to content

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
@github-actions
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. AudioLoader: Fix uncaught DOMException in promise. Nov 23, 2023
@Mugen87 Mugen87 merged commit b87e54f into mrdoob:dev Nov 23, 2023
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AudioLoader#loadAsync() cannot catch error as decoding audio wrong

1 participant