File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ module.exports = React.createClass({
71
71
72
72
removeEvents : function ( ) {
73
73
this . editorEl . removeEventListener ( 'keyup' , this . eventWrapper ) ;
74
- this . editorToolbarEl . removeEventListener ( 'click' , this . eventToolbar ) ;
74
+ this . editorToolbarEl && this . editorToolbarEl . removeEventListener ( 'click' , this . eventToolbar ) ;
75
75
} ,
76
76
77
77
addEvents : function ( ) {
@@ -82,7 +82,7 @@ module.exports = React.createClass({
82
82
this . editorToolbarEl = wrapperEl . getElementsByClassName ( 'editor-toolbar' ) [ 0 ] ;
83
83
84
84
this . editorEl . addEventListener ( 'keyup' , this . eventWrapper ) ;
85
- this . editorToolbarEl . addEventListener ( 'click' , this . eventToolbar ) ;
85
+ this . editorToolbarEl && this . editorToolbarEl . addEventListener ( 'click' , this . eventToolbar ) ;
86
86
} ,
87
87
88
88
addExtraKeys : function ( ) {
You can’t perform that action at this time.
0 commit comments