Skip to content

Commit

Permalink
sound: fix timeout error handling (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jul 2, 2023
1 parent cc8f7f5 commit a037d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
const xhr = new XMLHttpRequest();
let timeout = setTimeout(() => {
xhr.abort();
throw new Error('Timed out');
reject(new Error('Timed out'));
}, 5000);
xhr.onload = () => {
clearTimeout(timeout);
Expand Down

0 comments on commit a037d86

Please sign in to comment.