use replace over trimEnd to support ff60

This commit is contained in:
MiniDigger 2018-07-17 15:25:30 +02:00 committed by GitHub
parent 390d7c22ca
commit 8fa4a2833f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,7 +113,7 @@ function buildChatMessage(msg) {
// Remove empty lines around the MOTD (but not within it)
msg.text = lines
.map((line) => line.trimEnd())
.map((line) => line.replace(/\s*$/, ""))
.join("\n")
.replace(/^[\r\n]+|[\r\n]+$/g, "");
}