Skip to content

fix(runtime-core): skip vdom public properties on exposed vapor instances - #15624

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-exposed-public-props
Sep 25, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-exposed-public-props

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

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. $el throws Cannot read properties of undefined (reading 'el'), and $forceUpdate, $attrs, $slots, $parent and $root return whatever happens to share the field name.

getPublicInstance already bails out for Vapor instances, but the expose proxy in getComponentPublicInstance doesn't. With this change its get and has traps skip the public properties map for Vapor instances. Exposed keys work as before, and $ properties are undefined, 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

@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 44c6f805-5d51-4216-8849-069edeac183c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@15624
npm i https://pkg.pr.new/@vue/compiler-core@15624
yarn add https://pkg.pr.new/@vue/compiler-core@15624.tgz

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@15624
npm i https://pkg.pr.new/@vue/compiler-dom@15624
yarn add https://pkg.pr.new/@vue/compiler-dom@15624.tgz

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@15624
npm i https://pkg.pr.new/@vue/compiler-sfc@15624
yarn add https://pkg.pr.new/@vue/compiler-sfc@15624.tgz

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@15624
npm i https://pkg.pr.new/@vue/compiler-ssr@15624
yarn add https://pkg.pr.new/@vue/compiler-ssr@15624.tgz

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@15624
npm i https://pkg.pr.new/@vue/compiler-vapor@15624
yarn add https://pkg.pr.new/@vue/compiler-vapor@15624.tgz

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@15624
npm i https://pkg.pr.new/@vue/reactivity@15624
yarn add https://pkg.pr.new/@vue/reactivity@15624.tgz

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@15624
npm i https://pkg.pr.new/@vue/runtime-core@15624
yarn add https://pkg.pr.new/@vue/runtime-core@15624.tgz

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@15624
npm i https://pkg.pr.new/@vue/runtime-dom@15624
yarn add https://pkg.pr.new/@vue/runtime-dom@15624.tgz

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@15624
npm i https://pkg.pr.new/@vue/runtime-vapor@15624
yarn add https://pkg.pr.new/@vue/runtime-vapor@15624.tgz

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@15624
npm i https://pkg.pr.new/@vue/server-renderer@15624
yarn add https://pkg.pr.new/@vue/server-renderer@15624.tgz

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@15624
npm i https://pkg.pr.new/@vue/shared@15624
yarn add https://pkg.pr.new/@vue/shared@15624.tgz

vue

pnpm add https://pkg.pr.new/vue@15624
npm i https://pkg.pr.new/vue@15624
yarn add https://pkg.pr.new/vue@15624.tgz

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@15624
npm i https://pkg.pr.new/@vue/compat@15624
yarn add https://pkg.pr.new/@vue/compat@15624.tgz

commit: 162d677

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.2 kB 30.6 kB 26.9 kB
runtime-dom.global.prod.js 116 kB (+14 B) 43.8 kB (+5 B) 39.3 kB (+50 B)
vue.global.prod.js 176 kB (+14 B) 64 kB (+6 B) 57 kB (-43 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.1 kB (+14 B) 20.7 kB (+6 B) 18.9 kB (-17 B)
createApp 61.9 kB (+14 B) 23.9 kB (+5 B) 21.8 kB (+41 B)
createApp + vaporInteropPlugin 124 kB (+1.83 kB) 44.8 kB (+611 B) 40.3 kB (+484 B)
createVaporApp 30.9 kB (+90 B) 11.9 kB (+30 B) 10.9 kB (+24 B)
createSSRApp 66.9 kB (+14 B) 25.9 kB (+4 B) 23.5 kB (-37 B)
createVaporSSRApp 37.6 kB (+443 B) 14.3 kB (+170 B) 13.1 kB (+144 B)
defineCustomElement 68.4 kB (+14 B) 25.9 kB (+7 B) 23.5 kB
defineVaporCustomElement 46.3 kB (+90 B) 16.8 kB (+25 B) 15.4 kB (+29 B)
overall 77.4 kB (+14 B) 29.4 kB (+6 B) 26.6 kB (-3 B)

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor Author

For context, this shows up during incremental migration: an existing VDOM parent doing childRef.value.$el crashes as soon as the child switches to Vapor, and $attrs / $parent silently return unrelated internals. This makes them consistently undefined, as with a Vapor parent and as discussed in #14436.

@edison1105
edison1105 merged commit caf4a59 into vuejs:minor Sep 25, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants