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

fix(nuxt): keep route param optionality when sibling is an index - #5300

Merged
pi0 merged 4 commits into
mainfrom
fix/param-optionality
Jun 9, 2022
Merged

fix(nuxt): keep route param optionality when sibling is an index#5300
pi0 merged 4 commits into
mainfrom
fix/param-optionality

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#14079

❓ 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

We were currently stripping optionality from all sibling routes with params, even if these were deeply nested.

In fact, we don't seem to need to do this at all as path priority should go to index even with a sibling with optional param: https://paths.esm.dev/?p=AAMeJbiAwQUZTAfaFOBUBAAA.

📝 Checklist

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

@danielroedanielroe added bug Something isn't working pages 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Jun 5, 2022
@danielroe
danielroe requested a review from pi0June 5, 2022 20:44
@danielroedanielroe self-assigned this Jun 5, 2022
@netlify

netlifyBot commented Jun 5, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit7c8d2fc
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62a1ecb00ab31700084bd314

Comment threadpackages/nuxt/test/pages.test.ts
pi0
pi0 approved these changes Jun 9, 2022
@pi0

pi0 commented Jun 9, 2022

Copy link
Copy Markdown
Member

@danielroe Can you please resolve conflict?

@pi0
pi0 merged commit 27a0084 into mainJun 9, 2022
@pi0
pi0 deleted the fix/param-optionality branch June 9, 2022 13:03
@pi0pi0 mentioned this pull request Jun 10, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usagepages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

optional route param does't work

2 participants

@danielroe@pi0