mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
fix endsWith if check
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user