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

mountChildren Uncaught TypeError: Cannot read properties of null (reading 'length') #10007

Closed
codesyofo opened this issue Jan 5, 2024 · 4 comments · Fixed by #10010
Closed
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed.

Comments

@codesyofo
Copy link

Vue version

3.4.5

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-dp5c9p?file=src%2FApp.vue

Steps to reproduce

<div>
  {show.value ? <div>show</div> : <></>}

  <button onClick={(show.value = !show.value)}>toggle</button>
</div>

--> Uncaught TypeError: Cannot read properties of null (reading 'length')

<div>
  {show.value ? <div>show</div> : <> </>}

  <button onClick={(show.value = !show.value)}>toggle</button>
</div>

--> it's ok

What is expected?

.

What is actually happening?

.

System Info

No response

Any additional comments?

No response

@LinusBorg
Copy link
Member

LinusBorg commented Jan 5, 2024

Rendering an empty Fragment isn't necessary here, just use null.

We can handle an empty Fragment better, though.

@LinusBorg LinusBorg added the 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. label Jan 5, 2024
@AhmadALi-glitch

This comment was marked as off-topic.

@LinusBorg

This comment was marked as off-topic.

@AhmadALi-glitch

This comment was marked as off-topic.

Doctor-wu added a commit to Doctor-wu/core that referenced this issue Jan 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants