Skip to content

Commit

Permalink
fix(extension-link): fixes link going to wrong url (#4078)
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Narus <joe@status.cx>
  • Loading branch information
joenarus and Joe Narus committed Jul 7, 2023
1 parent a186ac4 commit 3053865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/extension-link/src/helpers/clickHandler.ts
Expand Up @@ -16,7 +16,7 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {
}

const attrs = getAttributes(view.state, options.type.name)
const link = (event.target as HTMLElement)?.closest('a')
const link = (event.target as HTMLLinkElement)

const href = link?.href ?? attrs.href
const target = link?.target ?? attrs.target
Expand Down

0 comments on commit 3053865

Please sign in to comment.