We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efb5fde commit e79f6d6Copy full SHA for e79f6d6
rollup/polyfills/es5.js
@@ -34,6 +34,7 @@ if (!('startsWith' in String.prototype)) {
34
}
35
if (!('endsWith' in String.prototype)) {
36
String.prototype.endsWith = function (searchElement) {
37
- return this.indexOf(searchElement) === this.length - searchElement.length;
+ var i = this.indexOf(searchElement);
38
+ return i > -1 && i === this.length - searchElement.length;
39
};
40
0 commit comments