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

append fails on nil #11180

Closed
richvdh opened this issue Jun 27, 2023 · 1 comment · Fixed by #11181
Closed

append fails on nil #11180

richvdh opened this issue Jun 27, 2023 · 1 comment · Fixed by #11181

Comments

@richvdh
Copy link

richvdh commented Jun 27, 2023

Given the following in a template file:

{{ $res := slice }}
{{ $res | append nil }}

... the build will fail with an error like:

... execute of template failed: template: "partials/openapi/render-api.html" at <append nil>: error calling append: reflect: call of reflect.Value.Type on zero Value

This previously worked with Hugo v1.113.0. I suspect it was introduced by #11104.

What version of Hugo are you using (hugo version)?

v0.114.1

Does this issue reproduce with the latest release?

yes

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant