Fix incorrectly trimming channel

This commit is contained in:
Pavel Djundik 2018-07-13 10:55:39 +03:00 committed by Pavel Djundik
parent 9249464445
commit 8e130f0259

View File

@ -75,7 +75,7 @@ socket.on("msg", function(data) {
}
}
if (channel.messages.length > messageLimit) {
if (messageLimit > 0 && channel.messages.length > messageLimit) {
channel.messages.splice(0, channel.messages.length - messageLimit);
channel.moreHistoryAvailable = true;
}