Fix for stats with no chat open

This commit is contained in:
Cohee 2024-03-03 19:36:40 +02:00
parent 2a5c240399
commit c4da1e3576

View File

@ -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();