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

Keep-alive tag with Router is causing an internal error #6896

Closed
davidfarah2003 opened this issue Oct 17, 2022 · 3 comments
Closed

Keep-alive tag with Router is causing an internal error #6896

davidfarah2003 opened this issue Oct 17, 2022 · 3 comments

Comments

@davidfarah2003
Copy link

Vue version

3.2.41

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-sn8nws?file=src/App.vue

Steps to reproduce

first npm run serve
then switch between the 2 views "Home" and "All Data" repeatedly in the navbar

What is expected?

it is expected for the components to be cached when deactivated an reloaded correctly when activated

What is actually happening?

It's throwing an error "Uncaught (in promise) TypeError: Node.insertBefore: Argument 1 is not an object." when switching views and freezing

System Info

No response

Any additional comments?

This kind of setup with keep-alive and vue-router is the only one I could find on the web that is not deprecated, so I don't know if other configurations (if available) might work.

@zhangzhonghe
Copy link
Member

duplicate of #6852

@edison1105
Copy link
Member

close as duplicate.

@zhangzhonghe
Copy link
Member

@davidfarah2003 You can use a div as the root element in the component.

Example.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants