Skip to content

Commit a1d29c6

Browse files
Vitaly Kravtsovclaydiffrient
Vitaly Kravtsov
authored andcommitted
[fixed] rewrite removePortal as es5 function
Uglifyjs doesn't know anything about es6, so 1.7.0 breaks my build script with error ``` ERROR in index_586f597d6f9d7177eb8b.js from UglifyJs SyntaxError: Unexpected token punc «(», expected punc «:» [./~/react-modal/lib/components/Modal.js:103,0] ``` fix es6 -> es5
1 parent 975e9ab commit a1d29c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: lib/components/Modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ var Modal = React.createClass({
100100
}
101101
},
102102

103-
removePortal () {
103+
removePortal: function() {
104104
ReactDOM.unmountComponentAtNode(this.node);
105105
var parent = getParentElement(this.props.parentSelector);
106106
parent.removeChild(this.node);

Diff for: lib/components/ModalPortal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var ModalPortal = module.exports = React.createClass({
7777
focusManager.teardownScopedFocus();
7878
},
7979

80-
open () {
80+
open: function () {
8181
if (this.state.afterOpen && this.state.beforeClose) {
8282
clearTimeout(this.closeTimer);
8383
this.setState({ beforeClose: false });

0 commit comments

Comments
 (0)