File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ export class TipTapEditor extends TipTapEditorBase {
303
303
304
304
closeLinkDialog ( ) : void {
305
305
this . linkDialogExpanded = false ;
306
- this . editor . commands . focus ( ) ;
306
+ this . editor ? .commands . focus ( ) ;
307
307
}
308
308
309
309
showLinkDialog ( ) : void {
@@ -355,6 +355,8 @@ export class TipTapEditor extends TipTapEditorBase {
355
355
return ;
356
356
}
357
357
358
+ if ( ! this . editor ) { return }
359
+
358
360
if ( href ) {
359
361
this . closeLinkDialog ( ) ;
360
362
inputElement . value = "" ;
@@ -366,7 +368,7 @@ export class TipTapEditor extends TipTapEditorBase {
366
368
this . editor . commands . setTextSelection ( { from, to} ) ;
367
369
}
368
370
369
- const chain = this . editor
371
+ this . editor
370
372
?. chain ( )
371
373
. extendMarkRange ( "link" )
372
374
. setLink ( { href } )
You can’t perform that action at this time.
0 commit comments