Skip to content

Commit

Permalink
Merge pull request #135 from prymitive/modal-fix
Browse files Browse the repository at this point in the history
fix(ui): don't try to enable scrolling on unmounted modal
  • Loading branch information
prymitive authored Oct 9, 2018
2 parents b39f37a + 909d5a1 commit 50665e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/Components/Modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from "prop-types";

import { observer } from "mobx-react";

import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock";
import { disableBodyScroll, clearAllBodyScrollLocks } from "body-scroll-lock";

import {
MountModal,
Expand All @@ -23,7 +23,7 @@ const Modal = observer(
if (isOpen) {
disableBodyScroll(document.querySelector(".modal"));
} else {
enableBodyScroll(document.querySelector(".modal"));
clearAllBodyScrollLocks();
}
};

Expand Down

0 comments on commit 50665e2

Please sign in to comment.