Using v-if in a slot causes a crash
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 }
}
- Create a Container.vue component.
// Container.vue
<template>
<slot></slot>
</template>
- Use the Container component in the App component.
<template>
<div>
<Container>
<div v-if="isReady" >Hello Vue 3.0</div>
</Container>
</div>
</template>
- Crashed when
setTimeout
was executed andisReady
changed.
What is expected?
It should render Hello Vue 3.0
on screen.
What is actually happening?
Crashed
None.