Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-11-03 11:18:35 +01:00
parent d0c1bbd4d2
commit b8208ef40f
1 changed files with 9 additions and 3 deletions

View File

@ -2100,13 +2100,19 @@ module.exports = (_ => {
if (typeof plugin[`process${type}`] == "function") {
if (typeof e.methodname == "string" && (e.methodname.indexOf("componentDid") == 0 || e.methodname.indexOf("componentWill") == 0)) {
e.node = BDFDB.ReactUtils.findDOMNode(e.instance);
if (e.node) return plugin[`process${type}`](e);
if (e.node) {
let tempReturn = plugin[`process${type}`](e);
return tempReturn !== undefined ? tempReturn : e.returnvalue;
}
else BDFDB.TimeUtils.timeout(_ => {
e.node = BDFDB.ReactUtils.findDOMNode(e.instance);
if (e.node) return plugin[`process${type}`](e);
if (e.node) plugin[`process${type}`](e);
});
}
else if (e.returnvalue || e.patchtypes.includes("before")) return plugin[`process${type}`](e);
else if (e.returnvalue || e.patchtypes.includes("before")) {
let tempReturn = plugin[`process${type}`](e);
return tempReturn !== undefined ? tempReturn : e.returnvalue;
}
}
}
};