Locohost
Locohost

Reputation: 1702

underscore template error: Uncaught SyntaxError: Unexpected token ILLEGAL

I don't see the issue in this template. Do you?...

<div class="wrap-photos">
    <% _.each(photos, function(photo) { %>
        <div class="wrap-photo">
            <span class="wrap-photo-img">
                <img src="<%= photo.get('urlImg') %>/<%= photo.get('photo_file_name') %>" id="<%= photo.get('id') %>" class="photo-img">
            </span>
            <span class="photo-caption"><%= photo.get('caption') %></span>
        </div>
    <% }); %>
</div>

Thanks for your help. I'm stuck on this.

Upvotes: 1

Views: 1909

Answers (1)

Locohost
Locohost

Reputation: 1702

@tsiki: That's a good suggestion. I've seen issues with invisible characters before. You get them sometimes when you cut/paste code from an article. Nasty bugs.

However...

I replaced my underscore-min.js and my backbone-min.js with the full annotated development versions and the error stopped. I can't imagine why this helped, but it did.

Thank you very much for the replies. I greatly appreciate your suggestions :-)

Upvotes: 1

Related Questions