-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
v-if, v-show and subproperty #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also I believe that changing a property from a string to an object won't create getters and setter for the subproperties of the object, right? |
This is intended behavior - this is to (1. prevent computed properties from throwing errors 2. enable collecting dependency) when they try to access properties that does not exist yet. When swapping a string to an object that object will be recursively observed too. (i.e. converted to getter/setters) I'm in the process of changing |
Has the truly conditional v-if landed in dev branch? (didn't see a reference to a commit) |
@dyu here: yyx990803/vue@3df6343 |
Thanks as always! |
Given this code:
If
item
isfalse
,undefined
ornull
the presence of{{selectedItem.text}}
transform it into an object with atext
property removing its original value.Is this an intended behavior?
The text was updated successfully, but these errors were encountered: