mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
fix endsWith if check
This commit is contained in:
@@ -365,7 +365,9 @@
|
||||
}
|
||||
return i < 0;
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof String.prototype.endsWith != 'function') {
|
||||
String.prototype.endsWith = function(suffix) {
|
||||
if (this.length < suffix.length) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user