-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
throwing in mount causes template refs to malfunction #7020
Comments
@LinusBorg you've tagged this one as "need more info". Indeed, my initial description was a bit wrong (that's because behavior is different when HMR takes place), I've updated reproduction and issue description with more precise information thank you! |
I think this is because some variable values are shared between different apps, and if the first-mounted app throws an error it may cause some variables not to be reset, which in turn causes the later-mounted app to behave in a way that is not expected. For example, in the following code, since the core/packages/runtime-core/src/scheduler.ts Lines 245 to 253 in 6aaf8ef
|
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
viaapp1.config.errorHandler
- error goes awayThe text was updated successfully, but these errors were encountered: