Skip to content

Commit f45f270

Browse files
committed
fix build issues
1 parent 588abba commit f45f270

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/exports/elements/tip-tap-editor.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export class TipTapEditor extends TipTapEditorBase {
303303

304304
closeLinkDialog(): void {
305305
this.linkDialogExpanded = false;
306-
this.editor.commands.focus();
306+
this.editor?.commands.focus();
307307
}
308308

309309
showLinkDialog(): void {
@@ -355,6 +355,8 @@ export class TipTapEditor extends TipTapEditorBase {
355355
return;
356356
}
357357

358+
if (!this.editor) { return }
359+
358360
if (href) {
359361
this.closeLinkDialog();
360362
inputElement.value = "";
@@ -366,7 +368,7 @@ export class TipTapEditor extends TipTapEditorBase {
366368
this.editor.commands.setTextSelection({from, to});
367369
}
368370

369-
const chain = this.editor
371+
this.editor
370372
?.chain()
371373
.extendMarkRange("link")
372374
.setLink({ href })

0 commit comments

Comments
 (0)