sstephenson / eco

Embedded CoffeeScript templates
MIT License
1.71k stars 70 forks source link

List error: _ref is undefined #28

Closed ksesong closed 13 years ago

ksesong commented 13 years ago

I have done quite a basic template, with a simple loop. I don't know if this is a bug or a misinterpretation of the examples.

<ul>
    <% for meaning in @meanings: %>
        <li>
        <strong><%= meaning.description %></strong>
        </li>
    <% end %>
</ul>

Actually, the rendering is correct, but there is an error in the console:

_ref is undefined

_ref = this.meanings;
for (_i = 0, _len = _ref.length; _i < _len; _i++) { 

A typical data could be this one:

{"word": "submitter", "language": "en", "nature": "noun", "gender": "", "usage": "Plural submitters", "meanings": [{"description": "A person who submits (e.g. a paper for publication)", "examples": []}]}