Wrapping a computed in readonly()
causes console warnings and breaks the computed's functionality
#3376
Labels
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
🐞 bug
Something isn't working
scope: reactivity
Version
3.0.7
Reproduction link
https://codesandbox.io/s/admiring-mendel-pgnty?file=/src/App.vue
Steps to reproduce
What is expected?
true
to the consoleWhat is actually happening?
_value
&_dirty
being setundefined
reading the value from the readonly-computed causes console warnings about
setting readonly properties _value && _dirty - however, those are internal properties of the computed implementation
and need to be allowed to be set.
This also breaks the computed itself, as it can no longer be marked as dirty or update its computed value - that's why it logs
undefined
to the console instead oftrue
Already working on a PR
The text was updated successfully, but these errors were encountered: