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

Don't require a key for {@select} #133

Merged
merged 1 commit into from
Apr 18, 2015

Conversation

sethkinast
Copy link
Contributor

Also allowed type to be set on the select instead of each truth test. If type is set both places, the value on the truth test will take precedence.
Fixed coercion of undefined values. Previously, if a value was undefined it would not be coerced to the specified type.

Closes #123

@sethkinast
Copy link
Contributor Author

Everything deps #129 so ignore this until it goes in.

@sethkinast
Copy link
Contributor Author

Here's the one thing that I'm not certain on:

Previously, if you had a key that wasn't defined, it wouldn't be coerced even if you set the type.

{@eq key=does_not_exist value="undefined" type="string"}This does not appear{/eq}

But we've asked the helper to coerce to type string, so really does_not_exist should coerce to a String. I think. Let me know if this really was the intent. (There were no tests around it so I think it's just an oversight.)

@prashn64
Copy link
Contributor

+1 for the last comment, that's a legit use case and works better in this new world.

Also allowed `type` to be set on the select instead of each truth test. If `type` is set both places, the value on the truth test will take precedence.
Fixed coercion of undefined values. Previously, if a value was undefined it would not be coerced to the specified type.
sethkinast added a commit that referenced this pull request Apr 18, 2015
@sethkinast sethkinast merged commit dcfa99e into LinkedInAttic:master Apr 18, 2015
@sethkinast sethkinast deleted the select-no-key branch April 27, 2015 17:23
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

Successfully merging this pull request may close these issues.

Don't require a key for {@select}
2 participants