Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: matchPath not working with optional static segment #12285

Open
Mikilll94 opened this issue Nov 15, 2024 · 0 comments
Open

[Bug]: matchPath not working with optional static segment #12285

Mikilll94 opened this issue Nov 15, 2024 · 0 comments
Labels

Comments

@Mikilll94
Copy link

What version of React Router are you using?

6.28.0

Steps to Reproduce

  1. Run this code:
const match = matchPath("/something?", "/");
console.log(match);
  1. As you can see match is null.

Expected Behavior

match should not be null. Optional static segments are working for Route component.

Actual Behavior

match is null

@Mikilll94 Mikilll94 added the bug label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant