citra-emu
/
citra-web
Archived
1
0
Fork 0

Corrected trimNewLine function to prevent build errors based on unescaped control character U+000D

This commit is contained in:
chris062689 2017-06-05 16:10:49 -04:00
parent 80127d17fa
commit 36650a3f45
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}