fixed infinite loop -.-

This commit is contained in:
Erik 2021-06-20 01:52:14 +03:00
parent 7c01ee242f
commit 71ac4d71a9
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16

View File

@ -244,10 +244,7 @@ class Modmail {
for (let i = context < len ? context : len; i > 0; i--) { for (let i = context < len ? context : len; i > 0; i--) {
const entry = history[len - i]; const entry = history[len - i];
if (!entry) continue; if (!entry) continue;
if (entry.markread) { if (entry.markread) continue;
i++;
continue;
}
const user = await this.client.resolveUser(entry.author).catch(this.client.logger.error.bind(this.client.logger)); const user = await this.client.resolveUser(entry.author).catch(this.client.logger.error.bind(this.client.logger));
const mem = await this.getMember(user.id).catch(this.client.logger.error.bind(this.client.logger)); const mem = await this.getMember(user.id).catch(this.client.logger.error.bind(this.client.logger));