Skip to content

Commit ee74dfc

Browse files
ci: apply automated fixes
1 parent efcfb61 commit ee74dfc

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

e2e/solid-router/basic/src/main.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ function RootComponent() {
7676
<div class="flex items-center">
7777
<svg width="20" height="20" viewBox="0 0 20 20" role="img">
7878
<title id="rectTitle">Link in SVG</title>
79-
<a {...useLinkProps({ to: '/posts', 'aria-label': 'Open posts from SVG' })}>
79+
<a
80+
{...useLinkProps({
81+
to: '/posts',
82+
'aria-label': 'Open posts from SVG',
83+
})}
84+
>
8085
<rect
8186
x="0"
8287
y="0"

e2e/solid-router/basic/tests/app.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ test('Link in SVG does not trigger a full page reload', async ({ page }) => {
6161
await page.waitForURL(url)
6262

6363
expect(fullPageLoad).toBeFalsy()
64-
})
64+
})

packages/solid-router/src/link.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export function useLinkProps<
284284
const elementTarget = (
285285
e.currentTarget as HTMLAnchorElement | SVGAElement
286286
).getAttribute('target')
287-
287+
288288
const effectiveTarget =
289289
local.target !== undefined ? local.target : elementTarget
290290

@@ -599,11 +599,7 @@ export const Link: LinkComponent<'a'> = (props) => {
599599
// Default rendering - just use regular anchor element
600600
// This works for HTML contexts; SVG links inside SVGs won't work properly
601601
// due to Solid's compile-time namespace determination
602-
return (
603-
<a {...(linkProps as any)}>
604-
{children()}
605-
</a>
606-
)
602+
return <a {...(linkProps as any)}>{children()}</a>
607603
}
608604

609605
function isCtrlEvent(e: MouseEvent) {

0 commit comments

Comments
 (0)