Skip to content

Commit b776934

Browse files
committed
impr: stricter regexp match for models routes
1 parent 927412f commit b776934

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

static/js/publisher/components/PrimaryNav/PrimaryNav.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ function PrimaryNav(): React.JSX.Element {
104104
component: NavLink,
105105
to: `/admin/${storeId}/models`,
106106
icon: "models",
107-
"aria-current": location.pathname.includes(
108-
`/admin/${storeId}/models`,
107+
"aria-current": !!location.pathname.match(
108+
RegExp(`/admin/${storeId}/models(/.*|$)`),
109109
),
110110
}
111111
: null,

0 commit comments

Comments
 (0)