Skip to content

[custom elements api] TypeError: Cannot read properties of null (reading 'insertBefore') using v-if on named slot #13234

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

Open
wolandec opened this issue Apr 22, 2025 · 0 comments
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: custom elements

Comments

@wolandec
Copy link

Vue version

3.5.13

Link to minimal reproduction

https://play.vuejs.org/#eNqFVNtu00AQ/ZVhQYojJQ5V4SUkFTTkAR4AtZV4sYRce5y4Xe9a3nWayvK/M3tx4rihPCWey5kzlz0N+1KW4a5GNmcLlVR5qUGhrsurSORFKSsNTYXZBBJZlLXGtIWskgWMKGV0CFmtf1dxWWL1U6D3h7O+0VSg8EgkUigNubrdyicBSyDsIIu5wvEn4+4C7mutpbjDvaaYrnQQjJdX0EQCKE3XlYDRiufJIxQGux07gKwWic6lgG0sUuTXFsnGBWOb64uHu5jXSPBvTgwEFInFzI2ChkAfGouSxxrpC2DhqMHnxEAuI/aiTMSumubYQNsuZu7L5h/qgy03h6bxhpYKG/8tl5p6FhqFmRQI+lQmwJAhAv25esgDRdhN84xIeciIwVslCzSQPpTwyQCqX8RuLKmVph/kWJDN485Oez/ZKZlO/PSp9DM3f/2M7LjTXFHE8xzuuUweacvUZiTSfOfcRVxtcjHVspzDxfty383fI7EJ04p4ZvkmfFBS0JnatIiZq8g5MSnNtlXEaJSOdcRizuXTd2vTVY2Tzp5sMXk8Y39Qe2OL2K8KFVY7jNjBp4kgaude3/6gjfachUxrTtGvOG9QSV4bji7suhYp0e7FWbbf7EvKxeZOrfe0FdU1ZYiayNbGR4xe0uqV1o90L8MPNo8mSlNc2fWu3Xb9izRv/nTB9ixEXCDdUHc4dM8O/Ctmcc3pGHu3487CWIbnYGoOFGCoMcBjsaFKmlo46s2Q6VFQzrQwooPqdApSzHKBJ2HQ1ysrMU5gVmuDvDyXEgzrTAhabeNUPt1Iqedg9Qqc3uQZBG/c0/EJKqT5ByNnm/rnNJUCR+OxW9Mg3FE4mzFxPI02/keVXiZ30mBemleFd2ZPKjwu1q7y3Kr/fQqHZTt9IHRL55Ay80pxltDwQP7ssDKHTodxGX4MLy5Z+xexvUft

Steps to reproduce

  • create a custom element with named slot based on Vue 3 component
  • create a wrapper component using that custom element
  • use wrapper and put v-if condition on using of the named slot
  • start with false condition for displaying
  • changing the condition to true causes an exception

What is expected?

v-if condition works well and named slot is working as expected

What is actually happening?

exception thrown and named slot content is never shown

System Info

Any additional comments?

No response

@wolandec wolandec changed the title [custom-elements] TypeError: Cannot read properties of null (reading 'insertBefore') using v-if on named slot [custom elements api] TypeError: Cannot read properties of null (reading 'insertBefore') using v-if on named slot Apr 22, 2025
@edison1105 edison1105 added 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: custom elements labels Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: custom elements
Projects
None yet
Development

No branches or pull requests

2 participants