Skip to content

Commit

Permalink
[fixed] don't access ReactDOM.createPortal if DOM not available
Browse files Browse the repository at this point in the history
  • Loading branch information
Keegan Street authored and diasbruno committed Aug 19, 2020
1 parent 421a1c8 commit 94ad567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { polyfill } from "react-lifecycles-compat";
export const portalClassName = "ReactModalPortal";
export const bodyOpenClassName = "ReactModal__Body--open";

const isReact16 = ReactDOM.createPortal !== undefined;
const isReact16 = canUseDOM && ReactDOM.createPortal !== undefined;

const getCreatePortal = () =>
isReact16
Expand Down

0 comments on commit 94ad567

Please sign in to comment.