diff options
| author | sD <stoned@derpymail.org> | 2020-02-14 22:31:00 +0100 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-02-14 22:31:00 +0100 |
| commit | a6421cf518844a10fb258f49ffd202a20a171738 (patch) | |
| tree | 08527aea8176a3ac6de4d4a18b1ec28fb9e2d667 /webAO | |
| parent | 7d6534467a9e75472fc4f4345867b4fbcd5129fa (diff) | |
why is this necessary
Diffstat (limited to 'webAO')
| -rw-r--r-- | webAO/client.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/webAO/client.js b/webAO/client.js index a26c6c3..7f14aed 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1132,8 +1132,16 @@ class Client extends EventEmitter { for (let i = 1; i <= ini.emotions.number; i++) { try { const emoteinfo = ini.emotions[i].split("#"); - const esfx = ini.soundn[i] || "0"; - const esfxd = Number(ini.soundt[i]) || 0; + let esfx; + let esfxd; + try { + esfx = ini.soundn[i] || "0"; + esfxd = Number(ini.soundt[i]) || 0; + } catch (e) { + console.warn("ini sound is completly missing"); + esfx = "0"; + esfxd = 0; + } // Make sure the asset server is case insensitive, or that everything on it is lowercase emotes[i] = { desc: emoteinfo[0].toLowerCase(), |
