Repository navigation
fix(runtime-core): skip vdom public properties on exposed vapor instances - #15624
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 ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
@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
|
|
For context, this shows up during incremental migration: an existing VDOM parent doing |
When a VDOM parent holds a template ref to a Vapor child that calls
defineExpose, reading a$property from the ref runs the VDOM public-instance getters on a Vapor instance.$elthrowsCannot read properties of undefined (reading 'el'), and$forceUpdate,$attrs,$slots,$parentand$rootreturn whatever happens to share the field name.getPublicInstancealready bails out for Vapor instances, but the expose proxy ingetComponentPublicInstancedoesn't. With this change itsgetandhastraps skip the public properties map for Vapor instances. Exposed keys work as before, and$properties areundefined, the same as for a ref to a Vapor child from a Vapor parent. This matches #14436: these properties aren't supported on Vapor components.Playground