Skip to content

Commit

Permalink
Merge pull request #4 from wmertens/prettier
Browse files Browse the repository at this point in the history
prettier: add configuration, apply
  • Loading branch information
nickuraltsev authored Oct 13, 2017
2 parents 95e0fc3 + 98976d7 commit 1561542
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
"react": "^15.0.0",
"react-dom": "^15.0.0"
},
"prettier": {
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true
},
"scripts": {
"clean": "rimraf lib",
"build": "npm run clean && babel src --out-dir lib",
Expand Down
10 changes: 8 additions & 2 deletions src/ResizeDetector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,21 @@ export default class ResizeDetector extends Component {
}

componentWillUnmount() {
this.domElement.contentDocument.defaultView.removeEventListener('resize', this.props.onResize);
this.domElement.contentDocument.defaultView.removeEventListener(
'resize',
this.props.onResize
);
}

setDOMElement(domElement) {
this.domElement = domElement;
}

handleLoad() {
this.domElement.contentDocument.defaultView.addEventListener('resize', this.props.onResize);
this.domElement.contentDocument.defaultView.addEventListener(
'resize',
this.props.onResize
);
}

render() {
Expand Down

0 comments on commit 1561542

Please sign in to comment.