fix(link): change type HTMLLinkElement to HTMLAnchorElement (#5858)

This commit is contained in:
鸿则 2024-11-22 16:09:59 +08:00 committed by Nick Perez
parent c5d87d6765
commit ccd014728a

View File

@ -32,7 +32,7 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {
}
const attrs = getAttributes(view.state, options.type.name)
const link = (event.target as HTMLLinkElement)
const link = (event.target as HTMLAnchorElement)
const href = link?.href ?? attrs.href
const target = link?.target ?? attrs.target