From 81f3963fed4f97e5bd6d1fb89d024de468fd63ad Mon Sep 17 00:00:00 2001 From: headshot2017 <> Date: Tue, 21 Nov 2023 13:47:37 -0400 Subject: [PATCH 1/2] don't add empty sfx name to validUrls --- public/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.js b/public/index.js index 5d45451..7d70c24 100644 --- a/public/index.js +++ b/public/index.js @@ -135,7 +135,7 @@ export const getCharacterUrls = async () => { for (const value in charIni[key]) { const sfx = charIni[key][value]; const sfxUrl = `${BASE_SOUNDS_URL}` + "general/" + sfx + ".opus"; - if (sfx != null && sfx != "0" && sfx != "1" && !validUrls.find((existing) => existing == sfxUrl)) + if (sfx != null && sfx.length > 0 && sfx != "0" && sfx != "1" && !validUrls.find((existing) => existing == sfxUrl)) validUrls.push(sfxUrl); } } From 9a0f81cbe8959e58c9516c8961420aca1a3dba39 Mon Sep 17 00:00:00 2001 From: Headshotnoby <36455681+headshot2017@users.noreply.github.com> Date: Tue, 21 Nov 2023 16:05:02 -0400 Subject: [PATCH 2/2] length > 1 --- public/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.js b/public/index.js index 7d70c24..980b6aa 100644 --- a/public/index.js +++ b/public/index.js @@ -135,7 +135,7 @@ export const getCharacterUrls = async () => { for (const value in charIni[key]) { const sfx = charIni[key][value]; const sfxUrl = `${BASE_SOUNDS_URL}` + "general/" + sfx + ".opus"; - if (sfx != null && sfx.length > 0 && sfx != "0" && sfx != "1" && !validUrls.find((existing) => existing == sfxUrl)) + if (sfx != null && sfx.length > 1 && !validUrls.find((existing) => existing == sfxUrl)) validUrls.push(sfxUrl); } }