Skip to content

Commit 6ca6d1a

Browse files
committed
the router too
1 parent 3cacb89 commit 6ca6d1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react/src/reactrouter.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ export function withSentryRouting<P extends Record<string, any>, R extends React
244244
};
245245

246246
WrappedRoute.displayName = `sentryRoute(${componentDisplayName})`;
247-
hoistNonReactStatics(WrappedRoute, Route);
247+
// Need to set type to any because of hoist-non-react-statics typing
248+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
249+
hoistNonReactStatics(WrappedRoute, Route as any);
248250
// @ts-expect-error Setting more specific React Component typing for `R` generic above
249251
// will break advanced type inference done by react router params:
250252
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13dc4235c069e25fe7ee16e11f529d909f9f3ff8/types/react-router/index.d.ts#L154-L164

0 commit comments

Comments
 (0)