You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the app.config.warnRecursiveComputed flag to true
Create a computed that mutates its dependencies
Use that computed in the template
What is expected?
Vue should log a warning because the computed is still dirty after being evaluated
What is actually happening?
No warning is logged
System Info
Any additional comments?
The warning is mentioned in #10341, and the config option is added in 23953dd.
It seems that much of the code for computed refs was moved into a separate function, refreshComputed, at which point the functionality was lost.
I got a minimal patch working by duplicating the initial dirty check into the finally block after cleanupDeps, though I'm not certain if that's the right place for it:
Vue version
3.5.13
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-exn7drue?file=src%2FApp.vue
Steps to reproduce
app.config.warnRecursiveComputed
flag to trueWhat is expected?
Vue should log a warning because the computed is still dirty after being evaluated
What is actually happening?
No warning is logged
System Info
Any additional comments?
The warning is mentioned in #10341, and the config option is added in 23953dd.
It seems that much of the code for computed refs was moved into a separate function,
refreshComputed
, at which point the functionality was lost.I got a minimal patch working by duplicating the initial dirty check into the
finally
block aftercleanupDeps
, though I'm not certain if that's the right place for it:In an ideal scenario the warning would be able to specify exactly which dependencies caused the computed to be dirty, but that might be too complex.
The text was updated successfully, but these errors were encountered: