Skip to content

Commit 755a5e0

Browse files
committed
Force preact-router-based linking.
1 parent 0b057bc commit 755a5e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/match.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { h, Component } from 'preact';
2-
import { subscribers, getCurrentUrl } from 'preact-router';
2+
import { subscribers, getCurrentUrl, Link as StaticLink } from 'preact-router';
33

44
export class Match extends Component {
55
update = url => {
@@ -27,7 +27,7 @@ export class Match extends Component {
2727
export const Link = ({ activeClassName, path, ...props }) => (
2828
<Match path={path || props.href}>
2929
{ ({ matches }) => (
30-
<a {...props} class={[props.class || props.className, matches && activeClassName].filter(Boolean).join(' ')} />
30+
<StaticLink {...props} class={[props.class || props.className, matches && activeClassName].filter(Boolean).join(' ')} />
3131
) }
3232
</Match>
3333
);

0 commit comments

Comments
 (0)