This commit is contained in:
Mirco Wittrien 2019-11-01 16:38:41 +01:00
parent c3137bcc8e
commit 4541e79fba
2 changed files with 5 additions and 2 deletions

View File

@ -1430,7 +1430,10 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins || {}, cleanUps: BDFDB && BDFDB
function check (instance) {
if (!instance) return false;
let props = instance.stateNode ? instance.stateNode.props : instance.props;
return instance.type && config.name && config.name.some(name => ((instance.type.displayName || instance.type.name) === name)) || props && config.props && config.props.every(prop => BDFDB.ArrayUtils.is(prop) ? (BDFDB.ArrayUtils.is(prop[1]) ? prop[1].some(checkvalue => BDFDB.equals(props[prop[0]], checkvalue)) : BDFDB.equals(props[prop[0]], prop[1])) : props[prop] !== undefined);
return instance.type && config.name && config.name.some(name => ((instance.type.displayName || instance.type.name) === name)) || props && config.props && config.props.every(prop => BDFDB.ArrayUtils.is(prop) ? (BDFDB.ArrayUtils.is(prop[1]) ? prop[1].some(checkvalue => propcheck(props, prop[0], checkvalue)) : propcheck(props, prop[0], prop[1])) : props[prop] !== undefined);
}
function propcheck (props, key, value) {
return key != null && props[key] != null && value != null && (key == "className" ? props[key].indexOf(value) > -1 : BDFDB.equals(props[key], value));
}
};
BDFDB.ReactUtils.findOwner = function (nodeOrInstance, config) {

File diff suppressed because one or more lines are too long