Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using v-if in a slot causes a crash #2865

Closed
yyyanghj opened this issue Dec 22, 2020 · 1 comment
Closed

Using v-if in a slot causes a crash #2865

yyyanghj opened this issue Dec 22, 2020 · 1 comment

Comments

@yyyanghj
Copy link
Contributor

Version

3.0.4

Reproduction link

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

Steps to reproduce

// 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.

@yyyanghj
Copy link
Contributor Author

Duplicate of #2715

@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant