From 36650a3f45d1f3058285f48304e41671678f01f7 Mon Sep 17 00:00:00 2001 From: chris062689 Date: Mon, 5 Jun 2017 16:10:49 -0400 Subject: [PATCH] Corrected trimNewLine function to prevent build errors based on unescaped control character U+000D --- scripts/games/app.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; }