Skip to content

unexpected result of matchPath #14640

@IegorShumov

Description

@IegorShumov

Reproduction

matchPath('/test_route/:part?', '/test_route_more')

https://stackblitz.com/edit/rr-issue-14640

System Info

System:
    OS: Windows 11 10.0.26200
    CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-1360P
    Memory: 30.13 GB / 47.68 GB
  Binaries:
    Node: 20.18.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 143.0.7499.40
    Edge: Chromium (142.0.3595.76)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    react-router: 7.9.1 => 7.9.1 (and 7.10.1)

Used Package Manager

npm

Expected Behavior

should return null

Actual Behavior

matched

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions