kissyteam / kissy

A Powerful Collection Of Modules
http://docs.kissyui.com
2.7k stars 862 forks source link

xtemplate: each array of null error #672

Closed yiminghe closed 10 years ago

yiminghe commented 10 years ago

KISSY Version :

<5.0

Browsers :

all

What steps will reproduce the problem?

var tpl = '{{#each (data)}}{{xindex}}:{{this}}{{/each}}';
        var data = {
            data: [null]
        };

        var render = new XTemplate(tpl).render(data);

        expect(render).toBe('0:');

Expected

pass

actual

throw error