Skip to content

Commit

Permalink
Bugfix: Tiptap Link Picker, fixes anchor with an empty URL (#2522)
Browse files Browse the repository at this point in the history
Tiptap Link Picker, fixes anchor with an empty URL

it was previous appending the anchor to a  stringified `null`.
  • Loading branch information
leekelleher authored Nov 8, 2024
1 parent 2273af3 commit 6a7e8ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/packages/tiptap/extensions/toolbar/link.extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ export default class UmbTiptapToolbarLinkExtensionApi extends UmbTiptapToolbarEl

const anchor = this.#getAnchorFromQueryString(queryString);

if (anchor) url += anchor;
if (anchor) {
url = (url ?? '') + anchor;
}

if (!url) return null;

Expand Down

0 comments on commit 6a7e8ad

Please sign in to comment.