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

route.path is not editable in extendRoute #518

Closed
PindaPixel opened this issue Sep 27, 2024 · 1 comment
Closed

route.path is not editable in extendRoute #518

PindaPixel opened this issue Sep 27, 2024 · 1 comment

Comments

@PindaPixel
Copy link
Contributor

PindaPixel commented Sep 27, 2024

Regarding #468 (comment)

When editing route.path, the path stays unchanged.

This causes #468 (comment) to still occur

e.g.:

extendRoute(route) 
{
    console.log(route.path); // "question/:q-id"
    route.path = "question/:qId";
    console.log(route.path); // still "question/:q-id"
}

Edit:
I just saw https://github.com/posva/unplugin-vue-router/blob/main/src/core/extendRoutes.ts#L144, adding a leading slash would break my route hierarchy.

@posva
Copy link
Owner

posva commented Sep 27, 2024

Duplicate of #341

@posva posva marked this as a duplicate of #341 Sep 27, 2024
@posva posva closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
Repository owner locked and limited conversation to collaborators Sep 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants