Skip to content

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

Open
@wolandec

Description

@wolandec

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.scope: custom elements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions