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

Clean empty arrays #136

Open
sindresorhus opened this issue Aug 17, 2011 · 2 comments
Open

Clean empty arrays #136

sindresorhus opened this issue Aug 17, 2011 · 2 comments

Comments

@sindresorhus
Copy link

{{if}} should return false on empty arrays and arrays with empty strings.

@reconbot
Copy link

reconbot commented Oct 4, 2011

This isn't how javascript evaluates them. Boolean({}) === true Boolean([])=== true You can always do

{{if array.length }}

{{/if}

Or just use a {{each array}} statement.

As for the second part, I'm not sure what you're getting at or why you'd want it.

@rdworth
Copy link
Contributor

rdworth commented Oct 8, 2011

Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants