diff --git a/scripts/games/app.js b/scripts/games/app.js index af8bc9f..aafb7d9 100644 --- a/scripts/games/app.js +++ b/scripts/games/app.js @@ -41,11 +41,10 @@ function getDirectories (srcpath) { String.prototype.trimNewline = function() { let string = this.toString(); - let match = '\r\n' if (string.endsWith('\r\n')) { - return string.slice(0, -4); - } else if (string.endsWith('\r') || string.endsWith('\n')) { return string.slice(0, -2); + } else if (string.endsWith('\r') || string.endsWith('\n')) { + return string.slice(0, -1); } else { return string; }