Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
justinbmeyer opened this issue Jan 12, 2015 · 2 comments · Fixed by #1461
Closed

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

justinbmeyer opened this issue Jan 12, 2015 · 2 comments · Fixed by #1461
Labels
Milestone

Comments

@justinbmeyer
Copy link
Contributor

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
making can.view.live.html handle function callbacks right canjs#1398
@justinbmeyer
Copy link
Contributor Author

This is related to #629.

@justinbmeyer
Copy link
Contributor Author

@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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants