Repository navigation
fix(runtime-vapor): don't leak the dev-rendering parent into child setup - #16095
edison1105 merged 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
❌ Deploy Preview for vue-sfc-playground failed. Why did it fail? →
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
In a dev build, a Vapor parent stays set as the current rendering instance (#14719) through the
setupof every Vapor child it creates while rendering, so asset resolution in the child reads the parent. An inline-compiled (prebuilt) recursive component, like a tree item, rendered by a dev-compiled one gets the parent's type for its file-name self-reference and recurses untilMaximum call stack size exceeded; an explicitnameor a locally registered component fails to resolve. The same leak makesgetCurrentInstance()in the child return the parent, while production returnsnullas the 3.6 notes describe.setupComponentnow clears the rendering instance for setup in dev; the child's own render sets it again.Playground (
getCurrentInstance()in a child:Appin dev,nullwith PROD).