Skip to content

Current instance is not unset after rendering error on SSR #6110

@danielroe

Description

@danielroe

Vue version

3.2.37

Link to minimal reproduction

https://stackblitz.com/edit/github-qw7apw

Steps to reproduce

Click 'Trigger error'. It will try to load a component where there is a JS error.

Then click 'click here to see stale instance' - it will perform a hard reload, calling getCurrentInstance() on the server and revealing that the instance was not unset.

What is expected?

I expect the current component instance to be unset if there is a rendering error.

What is actually happening?

When there is a vue rendering error, the current component instance is not unset.

System Info

No response

Any additional comments?

In Nuxt we were relying on getCurrentInstance to return null if called outside of a Vue lifecycle. See nuxt/nuxt#14112.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions