From dda92bd41f4bee11e2cc5de265ce4fbf5221f1ff Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 20 Sep 2023 13:10:36 +0200 Subject: autoformat with eslint --- webAO/dom/opusCheck.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'webAO/dom/opusCheck.ts') diff --git a/webAO/dom/opusCheck.ts b/webAO/dom/opusCheck.ts index 5f0248d..608a30a 100644 --- a/webAO/dom/opusCheck.ts +++ b/webAO/dom/opusCheck.ts @@ -3,20 +3,20 @@ * @param {HTMLAudioElement} image the element containing the missing sound */ export function opusCheck( - channel: HTMLAudioElement + channel: HTMLAudioElement ): OnErrorEventHandlerNonNull { - const audio = channel.src; - if (audio === "") { - return; - } - console.warn(`failed to load sound ${channel.src}`); - let oldsrc = ""; - let newsrc = ""; - oldsrc = channel.src; - if (!oldsrc.endsWith(".opus")) { - newsrc = oldsrc.replace(".mp3", ".opus"); - newsrc = newsrc.replace(".wav", ".opus"); - channel.src = newsrc; // unload so the old sprite doesn't persist - } + const audio = channel.src; + if (audio === "") { + return; + } + console.warn(`failed to load sound ${channel.src}`); + let oldsrc = ""; + let newsrc = ""; + oldsrc = channel.src; + if (!oldsrc.endsWith(".opus")) { + newsrc = oldsrc.replace(".mp3", ".opus"); + newsrc = newsrc.replace(".wav", ".opus"); + channel.src = newsrc; // unload so the old sprite doesn't persist + } } window.opusCheck = opusCheck; \ No newline at end of file -- cgit