Backtestsvuerun-20261001-022054#15048
Scoped slot transforms array argument if rendered conditionally
The harness couldn't finish this ticket.
The test suite was unusable at the base commit.. No judgment was produced for this ticket. It counts as an error in the run total.
Solve
—
Wall-clock time in the container
Full test suite
Not run
The harness did not reach the test stage
Contamination audit
Unknown
See the audit notes for this run
Patch size
0vs 0 merged
Changed lines, ours vs merged
The issue
View on GitHubVue version
3.5.0
Link to minimal reproduction
Steps to reproduce
- Create a component with a scoped slot that is rendered conditionally
- Pass an array as the sole argument to the slot
What is expected?
Array is rendered normally.
If you render items of that array in v-for loop, you only see items inside that array
What is actually happening?
Array is transformed into object. Items and their indexes are staying the same, key field is added
<img width="383" height="111" alt="Image" src="https://github.com/user-attachments/assets/338bc873-5c20-4fb3-aed9-88f9f8e8cd98" />
System Info
Any additional comments?
key attribute is generated by the compiler for the slot rendered with v-if.
<img width="781" height="243" alt="Image" src="https://github.com/user-attachments/assets/99704cf9-71cb-435d-ba6f-92578b65ff5d" />
While this is not explicitly mentioned in documentation, one can assume that the expectation is that slotProps is always an object, as this is what will be passed to the slot if you use multiple v-bind directives on the slot.
This issue is rather pointing out the difference in behavior of the slot when v-if is present or not present.
The two patches
No patch was produced.No patch was produced.