Skip to content

Commit

Permalink
Merge pull request reactjs#22 from misuba/bugfix/server-clean
Browse files Browse the repository at this point in the history
Shim the possibly-absent HTMLElement
  • Loading branch information
mzabriskie committed May 8, 2015
2 parents 1829f43 + 6887b00 commit e06e801
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/components/Modal.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
var React = require('react');
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment');
var ModalPortal = React.createFactory(require('./ModalPortal'));
var ariaAppHider = require('../helpers/ariaAppHider');
var injectCSS = require('../helpers/injectCSS');

var SafeHTMLElement = ExecutionEnvironment.canUseDOM ? window.HTMLElement : {};

var Modal = module.exports = React.createClass({

displayName: 'Modal',
Expand All @@ -15,7 +18,7 @@ var Modal = module.exports = React.createClass({
propTypes: {
isOpen: React.PropTypes.bool.isRequired,
onRequestClose: React.PropTypes.func,
appElement: React.PropTypes.instanceOf(HTMLElement),
appElement: React.PropTypes.instanceOf(SafeHTMLElement),
closeTimeoutMS: React.PropTypes.number,
ariaHideApp: React.PropTypes.bool
},
Expand Down

0 comments on commit e06e801

Please sign in to comment.