-
Notifications
You must be signed in to change notification settings - Fork 989
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488
Description
Environment
- Operating System: Linux
- Node Version: v20.19.5
- Nuxt Version: 4.1.2
- CLI Version: 3.28.0
- Nitro Version: 2.12.6
- Package Manager: npm@
- Builder: -
- User Config: compatibilityDate, future, nitro, content, modules, shopify, i18n, css, runtimeConfig, cookieControl, image, ogImage, site, icon, fonts, vite, experimental, routeRules, sentry, sourcemap
- Runtime Modules: @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @vueuse/[email protected], [email protected], @nuxtjs/[email protected], [email protected], @dargmuesli/[email protected], @sentry/nuxt/[email protected], @nuxtjs/[email protected], @pinia/[email protected], pinia-plugin-persistedstate/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected]
- Build Modules: -
Is this bug related to Nuxt or Vue?
Nuxt
Package
v4.x
Version
v4.0.0
Reproduction
I think the issue is pretty obvious. It is a very small edge-case that can be solved easily.
Description
The route.path.startsWith(link.path) in ContentNavigation leads to issues with default-open if the route has the same prefix.
E.g. if you would open /docs-old but /docs also exists, then /docs is opened on the ContentNavigation instead of /docs-old.
I guess this should be easily fixable by comparing the whole path instead of relying on startsWith.
Additional context
No response
Logs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488