Update BDFDB.js

This commit is contained in:
Mirco Wittrien 2020-01-31 09:12:55 +01:00
parent 69421d9681
commit e30f916731
1 changed files with 2 additions and 2 deletions

View File

@ -1106,13 +1106,13 @@
const pluginid = pluginname.toLowerCase();
if (!module.BDFDBpatch) module.BDFDBpatch = {};
modulefunctions = [modulefunctions].flat(10).filter(n => n);
for (let modulefunction of modulefunctions) {
for (let modulefunction of modulefunctions) if (module[modulefunction] == null || typeof module[modulefunction] == "function") {
if (!module.BDFDBpatch[modulefunction] || forceRepatch && (!module[modulefunction] || !module[modulefunction].isBDFDBpatched)) {
if (!module.BDFDBpatch[modulefunction]) {
module.BDFDBpatch[modulefunction] = {};
for (let type of WebModulesData.Patchtypes) module.BDFDBpatch[modulefunction][type] = {};
}
if (!module[modulefunction]) module[modulefunction] = _ => {};
if (!module[modulefunction]) module[modulefunction] = (_ => {});
const originalfunction = module[modulefunction];
module.BDFDBpatch[modulefunction].originalMethod = originalfunction;
module[modulefunction] = function () {