aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 87db272..44cc8bd 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -2244,7 +2244,10 @@ class Viewport {
this.currentBlipChannel %= this.blipChannels.length;
}
this.textnow = this.chatmsg.content.substring(0, this.textnow.length + 1);
- chatBoxInner.appendChild(this.chatmsg.parsed[this.textnow.length - 1]);
+ const characterElement = this.chatmsg.parsed[this.textnow.length - 1]
+ if (characterElement) {
+ chatBoxInner.appendChild(this.chatmsg.parsed[this.textnow.length - 1]);
+ }
// scroll to bottom
chatBox.scrollTop = chatBox.scrollHeight;