File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ export default class Select2 extends Component {
9393
9494 const handlerChanged = e => prevProps [ e [ 1 ] ] !== props [ e [ 1 ] ] ;
9595 if ( props . events . some ( handlerChanged ) ) {
96- this . detachEventHandlers ( props ) ;
96+ this . detachEventHandlers ( ) ;
9797 this . attachEventHandlers ( props ) ;
9898 }
9999 }
@@ -111,7 +111,7 @@ export default class Select2 extends Component {
111111
112112 destroySelect2 ( withCallbacks = true ) {
113113 if ( withCallbacks ) {
114- this . detachEventHandlers ( this . props ) ;
114+ this . detachEventHandlers ( ) ;
115115 }
116116
117117 this . el . select2 ( 'destroy' ) ;
@@ -126,9 +126,9 @@ export default class Select2 extends Component {
126126 } ) ;
127127 }
128128
129- detachEventHandlers ( props ) {
130- props . events . forEach ( event => {
131- if ( typeof props [ event [ 1 ] ] !== 'undefined' ) {
129+ detachEventHandlers ( ) {
130+ this . props . events . forEach ( event => {
131+ if ( typeof this . props [ event [ 1 ] ] !== 'undefined' ) {
132132 this . el . off ( event [ 0 ] ) ;
133133 }
134134 } ) ;
You can’t perform that action at this time.
0 commit comments