Skip to content

Commit

Permalink
Change helperto safeHTMLElement now that appElement is gone
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Fuller committed Jun 26, 2017
1 parent cecef1d commit 24caa29
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import ModalPortal from './ModalPortal';
import * as ariaAppHider from '../helpers/ariaAppHider';
import { AppElement, SafeHTMLElement } from '../helpers/appElement';
import SafeHTMLElement from '../helpers/safeHTMLElement';

export const portalClassName = 'ReactModalPortal';
export const bodyOpenClassName = 'ReactModal__Body--open';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ModalPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as focusManager from '../helpers/focusManager';
import scopeTab from '../helpers/scopeTab';
import * as ariaAppHider from '../helpers/ariaAppHider';
import * as refCount from '../helpers/refCount';
import { SafeHTMLElement } from '../helpers/appElement';
import SafeHTMLElement from '../helpers/safeHTMLElement';

// so that our CSS is statically analyzable
const CLASS_NAMES = {
Expand Down
6 changes: 0 additions & 6 deletions src/helpers/appElement.js

This file was deleted.

7 changes: 7 additions & 0 deletions src/helpers/safeHTMLElement.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import ExecutionEnvironment from 'exenv';

const EE = ExecutionEnvironment;

const SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};

export default SafeHTMLElement;

0 comments on commit 24caa29

Please sign in to comment.