Computed properties function set on sub object properties add double quotes when displayed
Version
3.2.33
Reproduction link
Steps to reproduce
Execute the following code
{{vm.testComputedAdvanced}}
{{ testComputedDirect}}
{{ testComputedDirect}}
What is expected?
the string 'test content advanced' should not be display between double quotes
What is actually happening?
Today it display the string between double quotes.
This happens when the computed function, is set on a sub-object property
it's a plain object, so refs are not unwrapped in the template. so you don't print its value, you print the ref object.
When printing ref objects like you do, its value runs through JSON.stringify
so that this generates proper JSON:
{{ vm }}
prints:
{ "testComputedAdvanced": "test content advanced" }
The solution to your issue would be to properly print the ref's value:
{{vm.testComputedAdvanced.value}}
Is it possible to compile the code like this?
vm.testComputedAdvanced
compile to
_unref(_unref(vm).testComputedAdvanced)