Wrapping a computed in `readonly()` causes console warnings and breaks the computed's functionality
Version
3.0.7
Reproduction link
https://codesandbox.io/s/admiring-mendel-pgnty?file=/src/App.vue
Steps to reproduce
- Open the Sandbox link
- Check console and see readonly warnings
- Read explanation in App.vue or below
What is expected?
- No warnings about readonly properties
- computed logging
true
to the console
What is actually happening?
- Warning about readonly properties
_value
&_dirty
being set - computed stops working, longs
undefined
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 of true
Already working on a PR