Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-10-19 15:23:58 +02:00
parent ad8049fd3d
commit e39792819e
1 changed files with 2 additions and 2 deletions

View File

@ -2210,7 +2210,6 @@ module.exports = (_ => {
}; };
InternalBDFDB.checkEle = function (pluginDataObjs, ele, type, config) { InternalBDFDB.checkEle = function (pluginDataObjs, ele, type, config) {
pluginDataObjs = [pluginDataObjs].flat(10).filter(n => n); pluginDataObjs = [pluginDataObjs].flat(10).filter(n => n);
let unmappedType = type.split(" _ _ ")[1] || type;
let ins = BDFDB.ReactUtils.getInstance(ele); let ins = BDFDB.ReactUtils.getInstance(ele);
if (typeof config.specialFilter == "function") { if (typeof config.specialFilter == "function") {
let component = config.specialFilter(ins); let component = config.specialFilter(ins);
@ -2225,7 +2224,8 @@ module.exports = (_ => {
} }
} }
else { else {
ins = BDFDB.ReactUtils.findConstructor(ins, "Channels") || BDFDB.ReactUtils.findConstructor(ins, "Channels", {up: true}) || ins; let unmappedType = type.split(" _ _ ")[1] || type;
ins = BDFDB.ReactUtils.findConstructor(ins, unmappedType) || BDFDB.ReactUtils.findConstructor(ins, unmappedType, {up: true}) || ins;
InternalBDFDB.patchComponent(pluginDataObjs, ins, type, config); InternalBDFDB.patchComponent(pluginDataObjs, ins, type, config);
BDFDB.PatchUtils.forceAllUpdates(pluginDataObjs.map(n => n.plugin), type); BDFDB.PatchUtils.forceAllUpdates(pluginDataObjs.map(n => n.plugin), type);
return true; return true;