Skip to content

Commit 1fb8ec1

Browse files
committed
Cleanup
1 parent cffe480 commit 1fb8ec1

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

packages/react/src/reactrouterv6-compat-utils.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable complexity */
21
/* eslint-disable max-lines */
32
// Inspired from Donnie McNeal's solution:
43
// https://gist.github.com/wontondon/e8c4bdf2888875e4c755712e99279536
@@ -416,10 +415,7 @@ function getNormalizedName(
416415
pathBuilder += newPath;
417416

418417
// If the path matches the current location, return the path
419-
if (
420-
location.pathname.endsWith(basename + branch.pathname) ||
421-
location.pathname.endsWith(`${basename}${branch.pathname}/`)
422-
) {
418+
if (location.pathname.endsWith(basename + branch.pathname)) {
423419
if (
424420
// If the route defined on the element is something like
425421
// <Route path="/stores/:storeId/products/:productId" element={<div>Product</div>} />

packages/react/src/reactrouterv6.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-disable complexity */
2-
/* eslint-disable max-lines */
3-
// Inspired from Donnie McNeal's solution:
4-
// https://gist.github.com/wontondon/e8c4bdf2888875e4c755712e99279536
51
import type { browserTracingIntegration } from '@sentry/browser';
62
import type { Integration } from '@sentry/core';
73
import type { ReactRouterOptions } from './reactrouterv6-compat-utils';

0 commit comments

Comments
 (0)