diff --git a/public/scripts/stats.js b/public/scripts/stats.js index 5a26a4905..48983766b 100644 --- a/public/scripts/stats.js +++ b/public/scripts/stats.js @@ -266,7 +266,7 @@ function countWords(str) { * @param {string} oldMesssage - The old message that's being processed. */ async function statMesProcess(line, type, characters, this_chid, oldMesssage) { - if (this_chid === undefined) { + if (this_chid === undefined || characters[this_chid] === undefined) { return; } await getStats();