Commit 7cfba4a 1 parent cae0484 commit 7cfba4a Copy full SHA for 7cfba4a
File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export default class PluginSample extends Plugin {
23
23
24
24
private customTab : ( ) => IModel ;
25
25
private isMobile : boolean ;
26
+ private blockIconEventBindThis = this . blockIconEvent . bind ( this )
26
27
27
28
onload ( ) {
28
29
this . data [ STORAGE_NAME ] = { readonlyText : "Readonly" } ;
@@ -361,13 +362,13 @@ export default class PluginSample extends Plugin {
361
362
icon : "iconSelect" ,
362
363
label : "On click-blockicon" ,
363
364
click : ( ) => {
364
- this . eventBus . on ( "click-blockicon" , this . blockIconEvent ) ;
365
+ this . eventBus . on ( "click-blockicon" , this . blockIconEventBindThis ) ;
365
366
}
366
367
} , {
367
368
icon : "iconClose" ,
368
369
label : "Off click-blockicon" ,
369
370
click : ( ) => {
370
- this . eventBus . off ( "click-blockicon" , this . blockIconEvent ) ;
371
+ this . eventBus . off ( "click-blockicon" , this . blockIconEventBindThis ) ;
371
372
}
372
373
} , {
373
374
icon : "iconSelect" ,
You can’t perform that action at this time.
0 commit comments