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 @@ -111,15 +111,15 @@ export default class Dispatcher {
111
111
const block = this . getEditableBlockByEvent ( evt )
112
112
if ( ! block ) return
113
113
const selection = this . selectionWatcher . getFreshSelection ( )
114
- if ( selection . isSelection ) {
114
+ if ( selection && selection . isSelection ) {
115
115
this . notify ( 'clipboard' , block , 'copy' , selection )
116
116
}
117
117
} )
118
118
. setupDocumentListener ( 'cut' , function cutListener ( evt ) {
119
119
const block = this . getEditableBlockByEvent ( evt )
120
120
if ( ! block ) return
121
121
const selection = this . selectionWatcher . getFreshSelection ( )
122
- if ( selection . isSelection ) {
122
+ if ( selection && selection . isSelection ) {
123
123
this . notify ( 'clipboard' , block , 'cut' , selection )
124
124
this . triggerChangeEvent ( block )
125
125
}
You can’t perform that action at this time.
0 commit comments