From 77e2da563b92bfac596caf0ee749f318e849786a Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Sun, 21 Aug 2022 18:32:18 +0200 Subject: wrap check in another if --- webAO/client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'webAO') 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 { -- cgit