aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2020-02-27 21:07:20 +0100
committersD <stoned@derpymail.org>2020-02-27 21:07:20 +0100
commit53109798db90f1066b32d0b8d411588ef5965520 (patch)
treeeb6e42a54b5edaff69bb3e042a9b19760bee8f96 /webAO
parentaee8c4cabc17947c94bd4b931679d0a5a8da37f4 (diff)
don't try to load empty sounds
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/webAO/client.js b/webAO/client.js
index f49e336..999f93a 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1657,7 +1657,7 @@ class Viewport {
if (!this.sfxplayed && this.chatmsg.snddelay + this.shoutTimer >= this.textTimer) {
this.sfxaudio.pause();
this.sfxplayed = 1;
- if (this.chatmsg.sound !== "0" && this.chatmsg.sound !== "1") {
+ if (this.chatmsg.sound !== "0" && this.chatmsg.sound !== "1" && this.chatmsg.sound !== "" && this.chatmsg.sound !== undefined) {
this.sfxaudio.src = AO_HOST + "sounds/general/" + encodeURI(this.chatmsg.sound.toLowerCase()) + ".wav";
this.sfxaudio.play();
}