Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): use router.resolve to resolve initial url#4770

Merged
pi0 merged 2 commits intomainfrom
fix/disappearing-query
May 3, 2022
Merged

fix(nuxt): use router.resolve to resolve initial url#4770
pi0 merged 2 commits intomainfrom
fix/disappearing-query

Conversation

@danielroe
Copy link
Member

🔗 Linked issue

resolves nuxt/nuxt#13899

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR uses the router to resolve the path (preserving query) as per the router spec.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working pages ❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf labels May 3, 2022
@danielroe danielroe requested a review from pi0 May 3, 2022 06:41
@danielroe danielroe self-assigned this May 3, 2022
@netlify
Copy link

netlify bot commented May 3, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit 6769226
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6270f056eaacdc0009063338

@pi0
Copy link
Member

pi0 commented May 3, 2022

(waiting for tests)

@pi0 pi0 changed the title fix(nuxt): use router to resolve initial url fix(nuxt): use router.resolve to resolve initial url May 3, 2022
@pi0 pi0 merged commit f74a523 into main May 3, 2022
@pi0 pi0 deleted the fix/disappearing-query branch May 3, 2022 09:31
@Ingramz
Copy link

Ingramz commented May 3, 2022

This seems to cause redirect loops when used on URL-s containing encoded characters.

See https://stackblitz.com/edit/github-knvdh5

@pi0
Copy link
Member

pi0 commented May 3, 2022

Related PR: #4781 (i will probably add encoding and slash normalizer to same one)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x bug Something isn't working ❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf pages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigating to a url with query string gets redirected to a url stripped off the query

3 participants