Skip to content

[Bug]: Match route does not work if there is a minus sign at the beginning #8525

@kulakowka

Description

@kulakowka

What version of React Router are you using?

6.2.1

Steps to Reproduce

<Routes>
      <Route path="/users/:id" element={<UserApp />} />
</Routes>

Expected Behavior

/users/-wYVsb1KDtT9YJJFUiSTq0dqUyvc5vK51nx7QW29CPJc - This route is matched

Actual Behavior

/users/-wYVsb1KDtT9YJJFUiSTq0dqUyvc5vK51nx7QW29CPJc - This route is NOT matched

/users/wYVsb1KDtT9YJJFUiSTq0dqUyvc5vK51nx7QW29CPJc - This route is matched

I think the problem is in the mechanism that is looking for a suitable route.

Anything that starts with a symbol - is not matched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions