From 397a0ed7ded20a3c36e7197db5d3017e9bbc1abd Mon Sep 17 00:00:00 2001 From: GarboMuffin Date: Sat, 1 Jul 2023 19:33:12 -0500 Subject: [PATCH] sound: fix timeout error handling --- 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);