Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ce3636

Browse files
committed
Remove autobind in Decoration
1 parent c623c64 commit 3ce3636

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/atom/decoration.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
44
import {Disposable} from 'event-kit';
55
import cx from 'classnames';
66

7-
import {createItem, autobind, extractProps} from '../helpers';
7+
import {createItem, extractProps} from '../helpers';
88
import {RefHolderPropType} from '../prop-types';
99
import {TextEditorContext} from './atom-text-editor';
1010
import {DecorableContext} from './marker';
@@ -40,8 +40,6 @@ class BareDecoration extends React.Component {
4040
constructor(props, context) {
4141
super(props, context);
4242

43-
autobind(this, 'observeParents');
44-
4543
this.decorationHolder = new RefHolder();
4644
this.editorSub = new Disposable();
4745
this.decorableSub = new Disposable();
@@ -93,7 +91,7 @@ class BareDecoration extends React.Component {
9391
}
9492
}
9593

96-
observeParents() {
94+
observeParents = () => {
9795
this.decorationHolder.map(decoration => decoration.destroy());
9896

9997
const editorValid = this.props.editorHolder.map(editor => !editor.isDestroyed()).getOr(false);

0 commit comments

Comments
 (0)