Skip to content

Commit 6a7e8ad

Browse files
authored
Bugfix: Tiptap Link Picker, fixes anchor with an empty URL (#2522)
Tiptap Link Picker, fixes anchor with an empty URL it was previous appending the anchor to a stringified `null`.
1 parent 2273af3 commit 6a7e8ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/packages/tiptap/extensions/toolbar/link.extension.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ export default class UmbTiptapToolbarLinkExtensionApi extends UmbTiptapToolbarEl
7575

7676
const anchor = this.#getAnchorFromQueryString(queryString);
7777

78-
if (anchor) url += anchor;
78+
if (anchor) {
79+
url = (url ?? '') + anchor;
80+
}
7981

8082
if (!url) return null;
8183

0 commit comments

Comments
 (0)