0.71.1 ERROR: Can't give argument to non-function

We updated Go (or more accurate: The Go template package) which fixed a bug which now correctly marks this as a logical error:

 {{ if ( $.Page.IsMenuCurrent "main" .) ( $.Page.HasMenuCurrent "main" .) }} 

In short: The result of what’s inside parens can never be a function and should never have arguments.

I assume the above should be:

 {{ if (or ( $.Page.IsMenuCurrent "main" .) ( $.Page.HasMenuCurrent "main" .)) }} 
3 Likes