mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 07:50:37 +01:00
ESlint no-unneeded-ternary
and no-extend-native, no-sequences
This commit is contained in:
@@ -448,6 +448,11 @@
|
||||
},
|
||||
};
|
||||
|
||||
if ('undefined' !== typeof window) {
|
||||
window.utils = module.exports;
|
||||
}
|
||||
|
||||
/* eslint "no-extend-native": "off" */
|
||||
if (typeof String.prototype.startsWith !== 'function') {
|
||||
String.prototype.startsWith = function (prefix) {
|
||||
if (this.length < prefix.length) {
|
||||
@@ -474,10 +479,6 @@
|
||||
return this.replace(/\s+$/g, '');
|
||||
};
|
||||
}
|
||||
|
||||
if ('undefined' !== typeof window) {
|
||||
window.utils = module.exports;
|
||||
}
|
||||
}('undefined' === typeof module ? {
|
||||
module: {
|
||||
exports: {},
|
||||
|
||||
Reference in New Issue
Block a user