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