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

fix: Normalize pathnameBase when matching #8533

Merged
merged 1 commit into from Feb 27, 2022
Merged

fix: Normalize pathnameBase when matching #8533

merged 1 commit into from Feb 27, 2022

Conversation

Isammoc
Copy link
Contributor

@Isammoc Isammoc commented Dec 26, 2021

As no member confirm or refuse my issue #8458.
Here a PR that fix the bug for me.

Not sure if this is the best place to call normalizePathname, though.

Do not hesitate to comment, I will gladly change my PR.

----- Commit message -----
Motivation:
When matching with "*", the pathnameBase had a trailing slash /.

Modifications:

  • Call normalizePathname for pathnameBase

Result:
We can use an element that call useRoutes to define another alternative router for matching with "*".

Closes: #8458

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Dec 26, 2021

Hi @Isammoc,

Welcome, and thank you for contributing to React Router!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run.

Thanks!

- The Remix team

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Dec 26, 2021

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@Isammoc
Copy link
Contributor Author

Isammoc commented Jan 22, 2022

Nearly I month. Can someone look for my PR or tell me what am I doing wrong, please?

@timdorr timdorr requested a review from mjackson January 23, 2022 02:00
@brophdawg11
Copy link
Contributor

Hi @Isammoc - thank you for the PR! I think this is in good shape. Would you be able to resolve the conflicts so this is in a spot where we can merge it? Thanks!

Motivation:
When matching with "*", the `pathnameBase` had a trailing slash `/`.

Modifications:
 * Call normalizePathname for pathnameBase

Result:
We can use an element that call useRoutes to define another alternative router for matching with "*".

Closes: #8458
@Isammoc
Copy link
Contributor Author

Isammoc commented Feb 27, 2022

@brophdawg11 Thank you for your message!

Here I rebased my PR.

@timdorr
Copy link
Member

timdorr commented Feb 27, 2022

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants