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

Trailing slash in url breaks routing #3787

Closed
rhyme999 opened this issue Oct 8, 2019 · 0 comments · Fixed by #3788
Closed

Trailing slash in url breaks routing #3787

rhyme999 opened this issue Oct 8, 2019 · 0 comments · Fixed by #3788

Comments

@rhyme999
Copy link

rhyme999 commented Oct 8, 2019

What you were expecting:
If I open list page with trailing slash in url like localhost:3000/posts/ , then all the links shoud still have correct paths, like /posts/create or /posts/12/show .

What happened instead:
Links get wrong path with two slashes, like /posts//create and /posts//12/show , so routing breaks

Steps to reproduce:
Just set trailing slash in url, open list page or reload.

Related code:
https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple

Other information:
Screens with reproduce
https://prnt.sc/pgf2qv
http://prntscr.com/pgf28t

Bug can be reproduced both for hash histrory and browser histrory

It seems like there was a similar bug, solved here #1108 . But it is still not working

Environment

  • React-admin version: 2.9.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant