-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Unable to detect nil
explicitly in conditionals
#5905
Comments
Thanks for such a quick fix @bep, but this doesn't appear to be fixed. Or at least it's not in The below code:
yields many lines with My current fix is to do:
Which makes me think it is probably caused by the fun which is |
I don't watch closed issues. Which isn't a way to say that all closed issues are fixed, they're just not on my radar anymore. |
@bep ok, what's the process for getting this issue looked into again? Re-opening the issue, or making a new one? I'd argue there's definitely still a bug here. |
Making a new one. |
Note that the issue described in the first comment is fixed. |
It definitely isn't. But anyway, new issue opened: #6015 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
After the last update to 0.55, i'm no longer able to specify if a value is equal to
nil
. This is especially useful when combined withwhere
. https://gohugo.io/functions/where/#unset-fields defines this as possible, although the example is using.Params
, which I guess behaves slightly differently.For example, given a page
yields
Doing
{{ if .Parent }}
acts false, as expected, meaning it seemsnil != nil
in this new release.After some naive researching, https://dev.to/pauljlucas/go-tcha-when-nil--nil-hic might have something to do with this?
The text was updated successfully, but these errors were encountered: