fix(nuxt): update NuxtPage when nested NuxtLayout has name=false#34078
fix(nuxt): update NuxtPage when nested NuxtLayout has name=false#34078
Conversation
|
|
@nuxt/kit
@nuxt/nitro-server
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
WalkthroughThis pull request addresses a bug where NuxtPage fails to render route changes when nested inside a NuxtLayout with the name prop set to false. The fix updates the LayoutProvider's isCurrent logic to treat a false name as always being the current layout, allowing proper re-rendering on route transitions. Documentation is updated to clarify that the name prop accepts false as a valid value, and test cases are added to verify the corrected behaviour. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (3)**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx,vue}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{test,spec}.{ts,tsx,js}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (2)📚 Learning: 2025-09-10T14:42:56.647ZApplied to files:
📚 Learning: 2024-12-12T12:36:34.871ZApplied to files:
🪛 LanguageTooldocs/4.api/1.components/3.nuxt-layout.md[uncategorized] ~25-~25: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
🔇 Additional comments (2)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
|
…y disabled layouts (#34078)
🔗 Linked issue
Fixes #34074
📚 Description
NuxtPagenot re-rendering when navigating between routes with a nested<NuxtLayout :name="false">name=false,isCurrent()now returnstrueso NuxtPage renders normally instead of returning cached vnodeTests
NuxtLayoutwithname=false