Skip to content
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

Template cache bug #4398

Closed
micopiira opened this issue Aug 20, 2021 · 1 comment · Fixed by #4840
Closed

Template cache bug #4398

micopiira opened this issue Aug 20, 2021 · 1 comment · Fixed by #4840
Labels
has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working 🔩 p2-edge-case

Comments

@micopiira
Copy link

Version

3.2.4

Reproduction link

https://codesandbox.io/s/purple-rain-2fooh

Steps to reproduce

If there are 2 separate Vue apps on the same page using the same root component using in-DOM templates, both of the apps will use the template of the first app.

index.html
<div id="app">foo</div>
<div id="app2">bar</div>

App.vue
<script>export default {};</script>

main.js
createApp(App).mount("#app");
createApp(App).mount("#app2");

What is expected?

Expected the sample above to render:

foo
bar

What is actually happening?

Sample above renders:

foo
foo

@posva posva added 🐞 bug Something isn't working has workaround A workaround has been found to avoid the problem 🔩 p2-edge-case labels Aug 20, 2021
@posva
Copy link
Member

posva commented Aug 20, 2021

You can workaround by creating a copy of the component:

createApp({...App}).mount("#app2");

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working 🔩 p2-edge-case
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants