fix(extension-link): fixes link going to wrong url (#4078)

Co-authored-by: Joe Narus <joe@status.cx>
This commit is contained in:
joenarus 2023-07-07 07:30:13 -06:00 committed by GitHub
parent a186ac40ee
commit 3053865475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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