Merge pull request #2597 from umbraco/temp-U4-11253

U4-11253 New Chrome 66 trimStart function is overriding the Umbraco C…
This commit is contained in:
Robert
2018-04-20 09:39:15 +02:00
committed by GitHub

View File

@@ -84,27 +84,21 @@
};
}
if (!String.prototype.trimStart) {
/** trims the start of the string*/
String.prototype.trimStart = function (str) {
if (this.startsWith(str)) {
return this.substring(str.length);
}
return this;
};
}
if (!String.prototype.trimEnd) {
/** trims the start of the string*/
String.prototype.trimStart = function (str) {
if (this.startsWith(str)) {
return this.substring(str.length);
}
return this;
};
/** trims the end of the string*/
String.prototype.trimEnd = function (str) {
if (this.endsWith(str)) {
return this.substring(0, this.length - str.length);
}
return this;
};
}
/** trims the end of the string*/
String.prototype.trimEnd = function (str) {
if (this.endsWith(str)) {
return this.substring(0, this.length - str.length);
}
return this;
};
if (!String.prototype.utf8Encode) {
@@ -332,4 +326,4 @@
}
})();
})();