BorisMoore / jquery-tmpl

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.
3.23k stars 1.01k forks source link

{{each}} Template Tag bug in IE7/8 #115

Closed mockee closed 13 years ago

mockee commented 13 years ago

Example: (jQuery 1.6.1 & jQuery Templates Plugin 1.0.0pre)

// data source
data = [
    { title: 'title', intro: [
        { name: 'name', intro: 'intro' }
    ]}
];
// using {{each}} tag and reading 'name' property of value in template
...
{{each intro}}
<li>${$value.name}</li>
{{/each}}
...

Then render it. In IE7/8, we got a error message as follow: can not get the value of property 'name': object is null or undefined.

But other browsers is ok, include IE9.