-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
function "has" will panic when used on nested map #134
Comments
Hi @cheungpat - thanks for the bug report, and sorry that you're experiencing this! I've reproduced this, and I think I know what's going on. A possible workaround would be to re-convert it to a {{- if has ((datasource "default").data | toYAML | yaml) "word" -}} It's a hack, but it should work for now. I'm going to see if I can figure out a proper fix for you though 😉 |
@cheungpat I've fixed this bug, and I've added numerous tests to make sure this sort of thing doesn't happen again! This'll be in the 1.7.0 release (next couple days, hopefully?), but if you want to try it out right away you can build |
Seems fixed! Thank you for fixing it so quick! 👍 |
You're welcome 😉 |
When using the
has
function to check if a key exists on a nested map,gomplate
will panic:Checking for key in top-level map works as expected:
The text was updated successfully, but these errors were encountered: