I am attempting to assign a class using the following syntax:
:class="{active: favs.medium_title.fontWeight === 'bold'}"
However, the fontWeight
attribute is not yet defined when the component loads.
This is an excerpt from my object:
favs: {
...
medium_title: {},
...
}
When I later add the fontWeight
property and give it a value, the active class is not applied as expected.