Skip to content

KeepAlive does not work with a child whose key = NaN #1513

@danyadev

Description

@danyadev

Version

3.0.0-beta.18

Reproduction link

https://jsfiddle.net/danyadev/d73m9qek/

Steps to reproduce

Click on the button and look at the console

What is expected?

no errors

What is actually happening?

TypeError: parentComponent.ctx.deactivate is not a function
    at unmount (vue.global.js:8623)
    at patch (vue.global.js:7711)
    at Object.sharedContext.activate (vue.global.js:9216)
    at processComponent (vue.global.js:8081)
    at patch (vue.global.js:7742)
    at componentEffect (vue.global.js:8268)
    at Object.reactiveEffect [as update] (vue.global.js:4181)
    at updateComponent (vue.global.js:8157)
    at processComponent (vue.global.js:8088)
    at patch (vue.global.js:7742)

If the Foo component is added with a deactivated hook, then it will work on the first click, but the error will not disappear

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions