Skip to content

Commit

Permalink
fix(js): Links should not receive router attributes (#29279)
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser authored Oct 14, 2021
1 parent 17e4fde commit 152dc16
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion static/app/components/links/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@ type Props = WithRouterProps & {
* A context-aware version of Link (from react-router) that falls
* back to <a> if there is no router present
*/
const BaseLink: React.FC<Props> = ({location, disabled, to, ref, ...props}) => {
const BaseLink: React.FC<Props> = ({
location,
disabled,
to,
ref,
router: _router,
params: _params,
routes: _routes,
...props
}) => {
useEffect(() => {
// check if the router is present
if (!location) {
Expand Down

0 comments on commit 152dc16

Please sign in to comment.