Skip to content

Commit

Permalink
Fixed #40 and .editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Kużyński committed Jan 22, 2017
1 parent c6add9f commit 56bc847
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.{js,jsx}]
indent_style=space
indent_size=2
trim_trailing_whitespace=false
15 changes: 8 additions & 7 deletions src/TetherComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,15 @@ class TetherComponent extends Component {
position() {
this._tether.position()
}

_registerEventListeners() {
if (this.props.onUpdate) {
this.on('update', this.props.onUpdate);
}
if (this.props.onRepositioned) {
this.on('repositioned', this.props.onRepositioned);
}
this.on('update', function () {
return this.props.onUpdate && this.props.onUpdate.apply(this, arguments);
});

this.on('repositioned', function () {
return this.props.onRepositioned && this.props.onRepositioned.apply(this, arguments);
});
}

get _renderNode() {
Expand Down

0 comments on commit 56bc847

Please sign in to comment.