fix endsWith if check

This commit is contained in:
barisusakli
2015-03-20 19:42:59 -04:00
parent 810d3be512
commit 6b950d0596

View File

@@ -365,7 +365,9 @@
} }
return i < 0; return i < 0;
}; };
}
if (typeof String.prototype.endsWith != 'function') {
String.prototype.endsWith = function(suffix) { String.prototype.endsWith = function(suffix) {
if (this.length < suffix.length) { if (this.length < suffix.length) {
return false; return false;