#each doesn't work with null values that change to a can.List #1398

Closed
justinbmeyer opened this Issue Jan 12, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@justinbmeyer
Contributor

justinbmeyer commented Jan 12, 2015

var template = can.stache("<ul>{{#each items}}<li>{{name}}</li>{{/each}}");
        var data = new can.Map({items: null});
        var frag = template(data);

        var div = document.createElement("div");
        div.appendChild(frag);


        data.attr("items", [{name: "foo"}]);

        equal(div.getElementsByTagName("li").length, 1, "li added");

zkat added a commit to likethesky/canjs that referenced this issue Jan 12, 2015

Merge pull request #2 from gthrive/view_live_callbacks
making can.view.live.html handle function callbacks right #1398
@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 12, 2015

Contributor

This is related to #629.

Contributor

justinbmeyer commented Jan 12, 2015

This is related to #629.

@justinbmeyer justinbmeyer added this to the 2.2.0 milestone Feb 11, 2015

@justinbmeyer justinbmeyer added the bug label Feb 11, 2015

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Feb 11, 2015

Contributor

@hurgleburgler Can you and @daffl get this in for 2.2 this week? Is there a pull request for this?

Contributor

justinbmeyer commented Feb 11, 2015

@hurgleburgler Can you and @daffl get this in for 2.2 this week? Is there a pull request for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment