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

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

Merged
merged 1 commit into from Dec 14, 2013
Merged

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

merged 1 commit into from Dec 14, 2013

Conversation

daffl
Copy link
Contributor

@daffl 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
undefined list passed to {{#each}}
@daffl daffl merged commit 4d2b396 into master Dec 14, 2013
@daffl daffl deleted the each-undefined-602 branch December 14, 2013 15:47
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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

None yet

2 participants