Skip to content

Commit

Permalink
fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
KonnorRogers committed Nov 22, 2024
1 parent 588abba commit f45f270
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/exports/elements/tip-tap-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ export class TipTapEditor extends TipTapEditorBase {

closeLinkDialog(): void {
this.linkDialogExpanded = false;
this.editor.commands.focus();
this.editor?.commands.focus();
}

showLinkDialog(): void {
Expand Down Expand Up @@ -355,6 +355,8 @@ export class TipTapEditor extends TipTapEditorBase {
return;
}

if (!this.editor) { return }

if (href) {
this.closeLinkDialog();
inputElement.value = "";
Expand All @@ -366,7 +368,7 @@ export class TipTapEditor extends TipTapEditorBase {
this.editor.commands.setTextSelection({from, to});
}

const chain = this.editor
this.editor
?.chain()
.extendMarkRange("link")
.setLink({ href })
Expand Down

0 comments on commit f45f270

Please sign in to comment.