The original official jQuery Templates plugin. This project was maintained by the jQuery team as an official jQuery plugin. It is no longer in active development, and has been superseded by JsRender.
Not all array values are converted to template items.
This is due to an incorrect check on line 148:
return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null;
This should be changed to
return dataItem != null ? newTmplItem( options, parentItem, tmpl, dataItem ) : null;
Steps to reproduce:
HTML:
<div id="tmpl"><div>${}
</div>
JavaScript:
$('body').append($('#tmpl').tmpl([0, 1, 2, 3]));
The problem is that the fist element in the array (0) is not rendered.
Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.
Not all array values are converted to template items. This is due to an incorrect check on line 148: return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null; This should be changed to return dataItem != null ? newTmplItem( options, parentItem, tmpl, dataItem ) : null;
Steps to reproduce: HTML: <div id="tmpl"><div>${}