fix(link): change type HTMLLinkElement to HTMLAnchorElement (#5858)
Some checks failed
build / lint (20) (push) Has been cancelled
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Has been cancelled
Publish / Release (20) (push) Has been cancelled
build / build (20) (push) Has been cancelled

This commit is contained in:
鸿则 2024-11-22 16:09:59 +08:00 committed by GitHub
parent 87d63d8d17
commit f8961a984f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,7 +32,7 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {
} }
const attrs = getAttributes(view.state, options.type.name) 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 href = link?.href ?? attrs.href
const target = link?.target ?? attrs.target const target = link?.target ?? attrs.target