mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
dd732e84f4
`where` template function's internal condition check function always returns `false` when a target value doesn't exist or it's nil value but this behavior makes it difficult to filter values which doesn't have a particular parameter. To solve it, this adds nil value comparison to the function. `where Values ".Param.key" nil` like clause can be used for the case above. Only "=", "==", "eq", "!=", "<>", "ne" operators are allowed to be used with `nil`. If an other operator is passed with `nil`, the condition check function returns `false` like before. Fix #1232 |
||
---|---|---|
.. | ||
template.go | ||
template_embedded.go | ||
template_funcs.go | ||
template_funcs_test.go | ||
template_resources.go | ||
template_resources_test.go | ||
template_test.go |