U4-11253 New Chrome 66 trimStart function is overriding the Umbraco Core trimStart polyfill

This commit is contained in:
Sebastiaan Janssen
2018-04-20 10:35:21 +02:00
parent 75fb070825
commit 861e5908a7

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