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

Lost Route params when using different method suffix files #2389

Open
manniL opened this issue Apr 23, 2024 · 0 comments
Open

Lost Route params when using different method suffix files #2389

manniL opened this issue Apr 23, 2024 · 0 comments
Labels
bug Something isn't working h3 router upstream

Comments

@manniL
Copy link
Member

manniL commented Apr 23, 2024

Environment

Stackblitz

Reproduction

https://stackblitz.com/edit/nitro-2389

  1. Open /a/o - see alpha and omega params present (correct)
  2. Open /a/delta (delta is the name of the other folder here), see only the alpha param.

To "resolve"/"have a workaround:

  1. Create a delta/index.get.ts as a "duplicate" of the omega [omega]/index.get.ts handler

Describe the bug

When using same-level folders with index files split by method, the router parameters get lost for requests not having a .method.ts file in every of the folders, when the path would match a subfolder.

The responsible handler is always correctly resolved though, but route params are missing.

Additional context

Reported in nuxt/nuxt#26903

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working h3 router upstream
Projects
None yet
Development

No branches or pull requests

2 participants