Skip to content

watch triggers on unmount for computed properties with undefined instead of the actual value #1525

Closed
@posva

Description

@posva

Version

3.0.0-beta.18

Reproduction link

https://jsfiddle.net/82xpeomh/

Steps to reproduce

  1. Click on Toggle
  2. Look at the list or the console

What is expected?

When toggling the component the watcher should either provide the newest value or not trigger

What is actually happening?

it is providing undefined


This happens when the computed needs to be recalculated right when leaving, that's why there is a onBeforeUnmount. From vuejs/router#350

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