Reduce the chance that other Webpack extensions can cause the Patcher class not to work

This commit is contained in:
redphx 2024-01-13 16:38:04 +07:00
parent da2a3c87bc
commit 5ccd04478d

View File

@ -6877,7 +6877,7 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
const nativeBind = Function.prototype.bind;
Function.prototype.bind = function() {
let valid = false;
if (arguments.length === 2 && arguments[0] === null) {
if (this.name.length <= 2 && arguments.length === 2 && arguments[0] === null) {
if (arguments[1] === 0 || (typeof arguments[1] === 'function')) {
valid = true;
}