Skip to content

Throw TypeError when writing html comment in teleport #10747

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

Closed
tonliver opened this issue Apr 20, 2024 · 2 comments · Fixed by #10748
Closed

Throw TypeError when writing html comment in teleport #10747

tonliver opened this issue Apr 20, 2024 · 2 comments · Fixed by #10748

Comments

@tonliver
Copy link
Contributor

Vue version

3.4.23

Link to minimal reproduction

https://play.vuejs.org/#__PROD__eNqVU8tu2zAQ/JUtL4lRW2qbnFzJ6AM5tIe2aHoUUCjSWmJCkQQfig1D/96lKDlOkQTIxRZ3ZrjD5fDAPmud9B7ZmmW2Mlw7sOi83hSSd1oZBwcwuIUBtkZ1cEbUs49H7Kvq9AQkaViErQJeKWlpp1bdj5Q87HHujMdFIbM0NqIWtHDYaVE6pFXWXm6uHWq7zlL6pIIS9AuQCb7xFkEbVfvKcSXBeOl4h9CpGrOU8JlX1jW0rhNQqa5D6YBLcCgw+H1ErNpSNgil3IN1ZCAQSaOVJNUSnOFNgwZci+B1TYRH6hqtU2b/oJjQLB09Z6EO/Ypv84LNYygYpAG7MdO/d46O8qkSvLo74eXbUlgs2FNNomZsdDI5tmTO0sy3vElurZJ0m4fgtGBBygWanzqMzRZsDSMSsFIIdf99rIWrWc71qsXq7on6rd2FWsF+GbRoerJ4xFxpGnQRvrr+gTv6PoJ0SV4Q+wXwN1olfPAYaV+8rMn2CW90+23MHZfNH3u1cyjtfKhgNDCHkV8wymEY5XNHf7B7kVyOukIONMU5w698DjHulaJQUmRi2t9R1GOdy8pgSfnN4XwB+WYmJn0pPMLbHN6/9Cpq3tPfpKEzHI6NhgGeDdPclGJ07D/pzmOeY+wXp5maHwo4RVvcqHpPcqq/Wa2m57RaTdmLxHERDf4fyL89mnA9NEqacfLhgg3/ADMdheU=

Steps to reproduce

  1. switch to production runtime mode
  2. use teleport in a component
  3. add a top level html comment in the teleport
  4. change any state in the component, trigger update
  5. destory the component

What is expected?

The component should be destoryed.

What is actually happening?

Got a TypeError. Whole app is broken.

Error message:

TypeError: Cannot read properties of null (reading 'parentNode')

1713574082948.png

System Info

No response

Any additional comments?

The bug is only reproduced in production mode.

@tonliver
Copy link
Contributor Author

Any progress?

@aless673
Copy link

@tonliver just wasted few hours to debug in "production" mode to understand that the HTML comment was the problem

using vue@3.5.12

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

Successfully merging a pull request may close this issue.

3 participants