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

Splat Route's inside pathless layout routes break with "-" at the start of the URL #8561

Closed
ryanflorence opened this issue Jan 5, 2022 · 3 comments · May be fixed by hixio-mh/react-router#8
Labels
accepted Accepted the changes, waiting for tests/CLA/etc. bug

Comments

@ryanflorence
Copy link
Member

ryanflorence commented Jan 5, 2022

What version of React Router are you using?

v6

Steps to Reproduce

https://stackblitz.com/edit/splat-route-dash-bug?file=src/App.tsx

<Routes>
  <Route element={<Layout />}>
    <Route path="*" element={<Splat />} />
  </Route>
</Routes>

Visit /-anything that starts with a "-".

Expected Behavior

Splat route should render at "/-splat"

Actual Behavior

Blank page, "no routes match" in the console.

Note that if you remove the pathless layout route above the splat it works fine.

@ryanflorence ryanflorence added bug accepted Accepted the changes, waiting for tests/CLA/etc. labels Jan 5, 2022
@ryanflorence ryanflorence changed the title Splat Route's break with "-" at the start of the URL Splat Route's inside pathless layout routes break with "-" at the start of the URL Jan 5, 2022
@timdorr
Copy link
Member

timdorr commented Jan 6, 2022

Duplicate of #8525

Slight difference in the pattern, but essentially the same bug.

@timdorr
Copy link
Member

timdorr commented Jan 6, 2022

@brophdawg11
Copy link
Contributor

Fixed in #8563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Accepted the changes, waiting for tests/CLA/etc. bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants