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

Fix warning: '.File.UniqueID on zero object' (#1007) #1633

Merged
merged 1 commit into from Jan 19, 2024

Conversation

deining
Copy link
Collaborator

@deining deining commented Jul 29, 2023

This PR closes #1007 (see my analysis there). The fix is quite easy, all we have to do here is to put a {{ with }} statement around the offending code line 8:

7  {{ with .Parent.File -}}
8     {{ $pages = (where $pages "Parent.File.UniqueID" "==" $parent.File.UniqueID) -}}
9  {{ end -}}

Also I did some code cleanup in order to prevent superfluous whitespace and lines.
I did a diff of the published user guide, and there are no changes caused by this PR other than white space cleanup.

@deining deining requested a review from chalin July 29, 2023 08:47
@deining deining added cleanup/refactoring e0-minutes Effort < 60 min fix Resolves some issue in the current code base labels Jul 29, 2023
@deining deining added this to the 23Q4 milestone Nov 4, 2023
@chalin chalin modified the milestones: 23Q4, 24Q1 Jan 11, 2024
Copy link
Collaborator

@chalin chalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful, thank you! See inline comment for one nit.

layouts/partials/section-index.html Outdated Show resolved Hide resolved
@chalin
Copy link
Collaborator

chalin commented Jan 15, 2024

The test failure is due to a flaky external link check (which should be fixed via #1790).

@chalin chalin merged commit 96baa45 into google:main Jan 19, 2024
9 checks passed
@deining deining deleted the file-unique-zero-object branch January 19, 2024 20:05
dbreseman added a commit to mendix/docs that referenced this pull request Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup/refactoring e0-minutes Effort < 60 min fix Resolves some issue in the current code base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hugo build: warning '.File.UniqueID on zero object'
2 participants