aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-08-21 18:32:18 +0200
committerstonedDiscord <Tukz@gmx.de>2022-08-21 18:32:18 +0200
commit77e2da563b92bfac596caf0ee749f318e849786a (patch)
tree2c1f322f1c7d122795732d8d158c752c22b78beb /webAO
parentf4711674144923ba14de51af4d1c9e108deec4fc (diff)
wrap check in another if
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/webAO/client.ts b/webAO/client.ts
index 94b80c1..debd318 100644
--- a/webAO/client.ts
+++ b/webAO/client.ts
@@ -773,12 +773,14 @@ class Client extends EventEmitter {
let char_chatbox = "default";
let char_muted = false;
- if (char_id < this.char_list_length && this.chars[char_id].name !== char_name) {
+ if (char_id < this.char_list_length && char_id >= 0) {
+ if(this.chars[char_id].name !== char_name) {
console.info(
`${this.chars[char_id].name} is iniediting to ${char_name}`
);
const chargs = (`${char_name}&` + "iniediter").split("&");
this.handleCharacterInfo(chargs, char_id);
+ }
}
try {