Skip to content

slot render error with a v-if/v-else #4164

@gdh51

Description

@gdh51

Version

3.2.0-beta.3

Reproduction link

SFC PLAYGROUND

Steps to reproduce

  1. in App.vue, slot content span's condition is falsy, but template's condition is truthy
  2. span use the default slot, template use the a slot
  3. in Comp.vue, provide both default slot and a slot with fallback value

What is expected?

111 is rendered without warning

What is actually happening?

text 'slot a' is rendered with a error

(4:18) v-else/v-else-if has no adjacent v-if.


It can run in runtime compile, but it seems that can't run in the playground

ps: if we delete v-else it can run correctly

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions