Skip to content

Commit

Permalink
fix(Link): mergeProps shouldn't override user props
Browse files Browse the repository at this point in the history
  • Loading branch information
octoshikari authored Sep 27, 2022
1 parent 64b5a40 commit c2036dd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ type Props<Params extends RouteParams> = {
} & Exclude<JSX.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>;

export function Link<Params extends RouteParams>(props: Props<Params>) {
props = mergeProps(props, {
activeClass: 'active',
});
props = mergeProps({activeClass: 'active'}, props);

const toIsString = createMemo(() => typeof props.to === 'string');

Expand Down

0 comments on commit c2036dd

Please sign in to comment.