I'm encountering an issue with some markup I have:
<div class="form-group" v-if="model.owner.enabled">
The model object in the scope is structured like this:
{
...
owner: {
enabled: true
...
}
...
}
However, Vue is throwing an error:
TypeError: Cannot read property 'enabled' of undefined
Can anyone help me pinpoint the problem? Could it be because the lookup is only searching for properties on the first level of the model object?
Interestingly, when I modify the markup to:
<div class="form-group" v-if="model.owner">
It works without any issues and the element is displayed. It seems that the model.owner
object being present is enough to satisfy the condition.
Thank you!