Skip to content

Commit d50918c

Browse files
hiroppyclaydiffrient
authored andcommitted
[fixed] Fix this scope (#296)
* [fixed] Make use of es6 modules * [fixed] Fix `this` scope
1 parent e10181d commit d50918c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/basic/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
var React = require('react');
2-
var ReactDOM = require('react-dom');
3-
var Modal = require('../../lib/index');
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import Modal from '../../lib/index';
44

55
var appElement = document.getElementById('example');
66

lib/components/ModalPortal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default class ModalPortal extends Component {
137137
});
138138
}
139139

140-
closeWithoutTimeout () {
140+
closeWithoutTimeout = () => {
141141
this.setState({
142142
beforeClose: false,
143143
isOpen: false,

0 commit comments

Comments
 (0)