[ReactUtils > findInTree] Fix error with undefined opts

pull/70/head
CanadaHonk 2 years ago committed by GitHub
parent 73a552d428
commit 74ea838a29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
src/util/react.js vendored

@ -17,7 +17,7 @@ export const getOwnerInstance = (node) => { // Go through React node's parent un
}
};
export const findInTree = (parent, filter, opts) => { // Find in tree utility function - parameters supported like BD's + PC's APIs to maintain compatibility
export const findInTree = (parent, filter, opts = {}) => { // Find in tree utility function - parameters supported like BD's + PC's APIs to maintain compatibility
const { walkable = null, ignore = [] } = opts;
if (!parent || typeof parent !== 'object') { // Parent is invalid to search through

Loading…
Cancel
Save