Skip to content

throwing in mount causes template refs to malfunction #7020

@xanf

Description

@xanf

Vue version

3.2.41

Link to minimal reproduction

https://stackblitz.com/edit/js-bhm79m?file=index.js

Steps to reproduce

Run an example, observe console.logs

What is expected?

testRef.value should not be null and should point to component inside#app2

What is actually happening?

testRef.value is pointing to component inside #app1 (first mount point)
or (if you had HMR) it will be null 💣

System Info

No response

Any additional comments?

if we add errorHandler to app1 via app1.config.errorHandler - error goes away

Metadata

Metadata

Assignees

No one assigned

    Labels

    🍰 p2-nice-to-havePriority 2: this is not breaking anything but nice to have it addressed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions