medusa-ui/medusa

m-attribute in iteration does not work

Closed this issue · 2 comments

For example:

 [$foreach $people]
<div class="person" m-class-append="$this.each.id == $active-id ? 'active' : ''">
    <p>[$this.each.name]</p>
</div>
[$end for]

Gives Property or field 'each' cannot be found on null

It is however, circumventable, by doing
<div class="person [$this.each.clazz]">

Which kind of begs the question if that m-class-append serves any use

Picked up in 3aa1898