Skip to content

Node.js based forum software built for the modern web

fix endsWith if check

barisusakli6b950d059651
diff --git a/public/src/utils.js b/public/src/utils.js
index b48b4345ae..930e03501f 100644
--- a/public/src/utils.js
+++ b/public/src/utils.js
@@ -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;