Skip to content

Commit

Permalink
fix: pass className in Link (#1045)
Browse files Browse the repository at this point in the history
* fix: link props class

* foundReducer stuff
  • Loading branch information
golota60 authored Feb 11, 2023
1 parent 8771348 commit bf690f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function Link({
if (activeClassName) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
props.className = props.className
? `${props} ${activeClassName}`
? `${props.className} ${activeClassName}`
: activeClassName;
}

Expand Down
12 changes: 6 additions & 6 deletions src/foundReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ const foundReducer = (
case ActionTypes.RESOLVE_MATCH:
// It doesn't make sense to resolve a match if there wasn't already an
// unresolved match.
return state
? {
match: state.match,
resolvedMatch: payload,
}
: null;
return (
state && {
match: state.match,
resolvedMatch: payload,
}
);
default:
return state;
}
Expand Down

0 comments on commit bf690f9

Please sign in to comment.