fix(runtime-vapor): only merge fallthrough attrs into a root component's props when there are some - #15739
Conversation
…t's props when there are some
|
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
|
Since #15708, a Vapor root component that can receive fallthrough attrs always merges them into its props, even when there are none. VDOM only merges when the attrs object has keys. So with empty attrs,
:style="undefined"turns into{}(and a style string into an object) in Vapor, while VDOM passes it through (playground).antdv-next hits this in its notification hook:
ContextHolderdeclares@readyand passes an optional style function to its root, which then callsstyle?.(placement)and throws.This marks the injected fallthrough source and merges it only when it has keys. An explicit
v-bindstill merges, asmergePropsdoes.