From a037d8644f5d0e71120de6b8bb1a4767edc7e890 Mon Sep 17 00:00:00 2001 From: GarboMuffin Date: Sat, 1 Jul 2023 19:34:23 -0500 Subject: [PATCH] sound: fix timeout error handling (#670) --- extensions/sound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/sound.js b/extensions/sound.js index 0a34b84418..57228fc0b5 100644 --- a/extensions/sound.js +++ b/extensions/sound.js @@ -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);