Skip to content

Abnormal result when register onCleanup conditionally #7695

@smoonsf

Description

@smoonsf

Vue version

3.2.47

Link to minimal reproduction

https://sfc.vuejs.org/#__DEV__eNp9UVtqwzAQvMpWP3HAtugDCqkTUgo9haA49tpxoxeSnHwY372SnHdL/ePdnZ0ZdjSQd63zfY9kQQpbmU47sOh6vWKyE1oZBwMYbFI4lK7awgiNUQJmnjFjkslKSeug4WULy7CXNCW3OH8LWGQkAUshkXj4jNVXCkp+cCxlr+ewXMHAJAClEKQUx5yrNplFLtYPsxSOzKAJ0DVnqfnEhItcklwEw3ejWIWdPxQBxqkYmYxVQaccfAK+cSg0Lx36DqDYPq6GYTp3HAvq2zje9M4pCeuKd9Vuycgxj4fwZyTuADjVthzjPp0IHijo2YCkZEo8E6XOv62S/k3iLewIWEYWp+sY8U8Qeka2zmm7oLSXetfmlRJ07TFqeuk6gVmtxPo5f8pfXmndWXc9z9GKbGPUwaLxjoykV+LUD/doMoOyRoPmX7O73RvDO+yX6Sl8Mv4ABlLaxw==

Steps to reproduce

  1. repeat clicking toggle.
  2. see console log.

What is expected?

cleanup function should not be called in not registering onCleanup condition.

What is actually happening?

cleanup function called in not registering onCleanup condition.

System Info

No response

Any additional comments?

No response

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