Skip to content

Commit

Permalink
fix var references
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 20, 2019
1 parent eef6b1a commit 7df751c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/material-ui/src/Popper/Popper.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ const Popper = React.forwardRef(function Popper(props, ref) {
return;
}

if (popper.current) {
popper.current.destroy();
popper.current = null;
if (popperRef.current) {
popperRef.current.destroy();
popperRef.current = null;
}

popper.current = new PopperJS(getAnchorEl(anchorEl), popperNode, {
popperRef.current = new PopperJS(getAnchorEl(anchorEl), popperNode, {
placement: flipPlacement(placementProps),
...popperOptions,
modifiers: {
Expand All @@ -99,12 +99,12 @@ const Popper = React.forwardRef(function Popper(props, ref) {
};

const handleClose = () => {
if (!popper.current) {
if (!popperRef.current) {
return;
}

popper.current.destroy();
popper.current = null;
popperRef.current.destroy();
popperRef.current = null;
};

const handleExited = () => {
Expand Down

0 comments on commit 7df751c

Please sign in to comment.