onScopeDispose
is not called inside not immediate watchers #12681
Open
Description
Vue version
3.5.13 (also tested on 22dcbf3 in Playground)
Link to minimal reproduction
Steps to reproduce
- Open the playground and the console. You will see how the
immediate
"watcher 2" runs and watcher 1 does the same afterwards (because watcher 2 changes the variable it depends) - Toggle the component: you will see how
onScopeDispose
from watcher 2 runs, but not the one from watcher 1
What is expected?
Both onScopeDispose
callbacks are fired properly and both messages are printed to the console, regardless the immediate
status of the watcher
What is actually happening?
The onScopeDispose
is properly fired on both
System Info
No response
Any additional comments?
No response