Subscribe on changes!

Using v-if in a slot causes a crash

avatar
Dec 22nd 2020

Version

3.0.4

Reproduction link

https://codesandbox.io/s/cool-bird-0pzue?file=/src/App.vue

Steps to reproduce

1.

// App.vue
setup() {
    const isReady = ref(false);
    setTimeout(() => isReady.value = true, 1000)
    return { isReady }
}
  1. Create a Container.vue component.
// Container.vue
<template>
  <slot></slot>
</template>
  1. Use the Container component in the App component.
<template>
  <div>
   <Container>
      <div v-if="isReady" >Hello Vue 3.0</div>
  </Container>
</div>
</template>
  1. Crashed when setTimeout was executed and isReady changed.

What is expected?

It should render Hello Vue 3.0 on screen.

What is actually happening?

Crashed


None.

avatar
Dec 22nd 2020

Duplicate of #2715