Pure2 empty arrays cause javascript errors

0 views
Skip to first unread message

nightshade427

unread,
Oct 22, 2009, 2:38:48 PM10/22/09
to PURE - JavaScript Templates Engine
It used to be that empty arrays just didnt render the template for the
items. Now it errors with:

"Result of expression 'loopi.l[0]' [undefined] is not an object."

Here is sample:

<div id="item_buttons">
<ul>
<li class="buttons">
<button class="name inv@data-inv"></button>
</li>
</ul>
</div>

var menu = {buttons:[]};
$("#item_buttons").autoRender(menu);

Any Ideas?

Mic (BeeBole)

unread,
Oct 22, 2009, 4:39:14 PM10/22/09
to PURE - JavaScript Templates Engine
I'll commit both fixes of this one and the issue related to the
'context' keyword together.
Thanks again for spotting the 2 problems.

Mic

nightshade427

unread,
Oct 22, 2009, 8:39:33 PM10/22/09
to PURE - JavaScript Templates Engine
Wow!! Awesome!! Thank you for putting out such a great library

nightshade427

unread,
Oct 25, 2009, 3:54:29 AM10/25/09
to PURE - JavaScript Templates Engine
Let me know when it's ready so I can test :)

Mic (BeeBole)

unread,
Oct 25, 2009, 4:46:03 PM10/25/09
to PURE - JavaScript Templates Engine
This one is fixed as from revision 2.20

nightshade427

unread,
Oct 25, 2009, 6:40:35 PM10/25/09
to PURE - JavaScript Templates Engine
Okay great, will try it out thanks ;)

nightshade427

unread,
Oct 25, 2009, 7:02:09 PM10/25/09
to PURE - JavaScript Templates Engine
Yep works like a charm, thanks
Reply all
Reply to author
Forward
0 new messages