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> throws an error when used with in-DOM template #715

Closed
NataliaTepluhina opened this issue Feb 10, 2020 · 0 comments
Closed

Comments

@NataliaTepluhina
Copy link
Member

Version

3.0.0-alpha.4

Reproduction link

https://codesandbox.io/s/keep-alive-bug-yoyh1

Steps to reproduce

  1. Create an app with in-DOM template with dynamic components
  2. Put dynamic component within <keep-alive> tag
  3. Try to switch between components

What is expected?

You should be able to change the component and component is expected to not to be destroyed when we switch to different component

What is actually happening?

On first component switch an error is thrown:

TypeError: parentComponent.sink.deactivate is not a function
    at unmount (https://unpkg.com/[email protected]/dist/vue.global.js:6780:40)

    at patch (https://unpkg.com/[email protected]/dist/vue.global.js:5992:15)

    at patchBlockChildren (https://unpkg.com/[email protected]/dist/vue.global.js:6195:15)

    at processFragment (https://unpkg.com/[email protected]/dist/vue.global.js:6245:19)

    at patch (https://unpkg.com/[email protected]/dist/vue.global.js:6004:19)

    at componentEffect (https://unpkg.com/[email protected]/dist/vue.global.js:6439:19)

    at run (https://unpkg.com/[email protected]/dist/vue.global.js:3773:22)

    at reactiveEffect (https://unpkg.com/[email protected]/dist/vue.global.js:3755:18)

    at callWithErrorHandling (https://unpkg.com/[email protected]/dist/vue.global.js:4436:38)

    at flushJobs (https://unpkg.com/[email protected]/dist/vue.global.js:4990:11)

On all the subsequent attempts the error is different:

TypeError: Cannot read property 'parentNode' of null
    at parentNode (https://unpkg.com/[email protected]/dist/vue.global.js:8551:34)

    at patchBlockChildren (https://unpkg.com/[email protected]/dist/vue.global.js:6191:21)

    at processFragment (https://unpkg.com/[email protected]/dist/vue.global.js:6245:19)

    at patch (https://unpkg.com/[email protected]/dist/vue.global.js:6004:19)

    at componentEffect (https://unpkg.com/[email protected]/dist/vue.global.js:6439:19)

    at run (https://unpkg.com/[email protected]/dist/vue.global.js:3773:22)

    at reactiveEffect (https://unpkg.com/[email protected]/dist/vue.global.js:3755:18)

    at callWithErrorHandling (https://unpkg.com/[email protected]/dist/vue.global.js:4436:38)

    at flushJobs (https://unpkg.com/[email protected]/dist/vue.global.js:4990:11)
@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 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

1 participant