Skip to content

Commit

Permalink
fix: memory leak of Trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Reson-a committed Nov 29, 2019
1 parent 42a75f8 commit 8ad1a0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/vc-trigger/Trigger.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ export default {
};
}

const trigger = cloneElement(child, newChildProps);
this.trigger = cloneElement(child, newChildProps);

return (
<ContainerRender
Expand All @@ -640,7 +640,7 @@ export default {
getContainer={this.getContainer}
children={({ renderComponent }) => {
this.renderComponent = renderComponent;
return trigger;
return this.trigger;
}}
/>
);
Expand Down

0 comments on commit 8ad1a0c

Please sign in to comment.