Skip to content

Commit

Permalink
Clean up messages from beginning rather than end (#270)
Browse files Browse the repository at this point in the history
This fixes a bug where new messages could not be censored because they
were cleaned up prematurely.
  • Loading branch information
11k committed May 28, 2023
1 parent 13631cf commit 551d800
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/chat/js/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ChatWindow extends EventEmitter {
element.remove();
});

this.messages = this.messages.slice(0, lines.length - this.maxlines);
this.messages = this.messages.slice(lines.length - this.maxlines);
}
}
}
Expand Down

0 comments on commit 551d800

Please sign in to comment.