Skip to content

Commit

Permalink
Merge pull request #1789 from the-kwisatz-haderach/bug/shared-events-…
Browse files Browse the repository at this point in the history
…cache

Issue 1787: Bind this during stringification of shared events cache values.
  • Loading branch information
boygirl authored Feb 13, 2021
2 parents 9c5a212 + 1b3c1a5 commit 8260061
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/victory-shared-events/src/victory-shared-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ export default class VictorySharedEvents extends React.Component {
const names = childNames.slice(index, index + newChildren.length);
const results = React.cloneElement(child, child.props, alterChildren(newChildren, names));
return memo.concat(results);
} else if (child.type && isFunction(child.type.getBaseProps)) {
} else if (
childNames[index] !== "parent" &&
child.type &&
isFunction(child.type.getBaseProps)
) {
const name = child.props.name || childNames[index];
const childEvents =
Array.isArray(events) &&
Expand Down

0 comments on commit 8260061

Please sign in to comment.