Description
Version
2.6.13
Reproduction link
https://codesandbox.io/s/quizzical-wildflower-mp7tm
Steps to reproduce
- create a component with scoped slot
- put at least 2 children inside this scoped slot
- make the first child conditionally rendered with V-IF directive
The V-IF directive in the first child will control the rendering of all the other siblings inside the scoped slot. This only happens if the first child inside the scoped slot uses V-IF - or if it is an HTML comment.
What is expected?
The V-IF should only affect the tag/component it is applied to - but not the siblings.
What is actually happening?
If the first child in any scoped slot is an HTML comment (and V-IF with a falsy argument actually renders HTML comment) - all the rest children in the scoped slot are not rendered.
The function "normalizeScopedSlot" in vue.runtime.esm.js for v2.6.13 is slightly different (and buggy) than v2.6.12.
In 2.6.12 the rendering is skipped if there is only 1 child in the scoped slot and this child is a comment.
However, in 2.6.13 there is no check for the number of children and the rendering of all children is skipped if the first child is both (a) comment and (b) not an async factory.