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

undefined list passed to {{#each}} #602

Merged
merged 1 commit into from Dec 14, 2013

Conversation

Projects
None yet
2 participants
@daffl
Contributor

daffl commented Dec 13, 2013

If undefined is passed to {#each}}, it errors. It needs to be fine with getting nothing.

@ghost ghost assigned daffl Dec 13, 2013

daffl added a commit that referenced this pull request Dec 14, 2013

Merge pull request #602 from bitovi/each-undefined-602
undefined list passed to {{#each}}

@daffl daffl merged commit 4d2b396 into master Dec 14, 2013

1 check passed

default The Travis CI build passed
Details

@daffl daffl deleted the each-undefined-602 branch Dec 14, 2013

equal(renderer.render({}), '<div></div>', 'Empty text rendered');
equal(renderer.render({ data: false }), '<div></div>', 'Empty text rendered');
equal(renderer.render({ data: null }), '<div></div>', 'Empty text rendered');
equal(renderer.render({ data: [ { name: 'David' }] }), '<div>David</div>', 'Expected name rendered');

This comment has been minimized.

@justinbmeyer

justinbmeyer Dec 18, 2013

Contributor

I think this should test updating a can.Map's list property to null then to an array and then back to null.

@justinbmeyer

justinbmeyer Dec 18, 2013

Contributor

I think this should test updating a can.Map's list property to null then to an array and then back to null.

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