Open
Description
Vue version
3.5.13
Link to minimal reproduction
Steps to reproduce
Create a functional component like this
export default function(...args) {
return h("div", args[1].slots.default?.())
}
What is expected?
The slots to be rendered.
What is actually happening?
The slots is not rendered, since null is passed as second argument to the function
System Info
System:
OS: Linux 6.13 Fedora Linux 41 (Workstation Edition)
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
Memory: 11.61 GB / 31.12 GB
Container: Yes
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - /usr/bin/node
Yarn: 1.22.22 - ~/.local/share/pnpm/yarn
npm: 10.9.2 - /usr/bin/npm
pnpm: 10.7.0 - ~/.local/share/pnpm/pnpm
bun: 1.2.4 - ~/.local/share/pnpm/bun
Browsers:
Chrome: 135.0.7049.52
Any additional comments?
The length of the function seems to be checked. Is this optimization necessary?
core/packages/runtime-core/src/componentRenderUtils.ts
Lines 113 to 130 in 4f6ef92