Skip to content

Commit

Permalink
Merge pull request #6 from octoshikari/main
Browse files Browse the repository at this point in the history
fix(Link):  mergeProps  shouldn't override user props
  • Loading branch information
Drevoed authored Sep 27, 2022
2 parents 64b5a40 + c2036dd commit cbc7e9c
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 cbc7e9c

Please sign in to comment.