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: Cannot read properties of null (reading 'Symbol(astro.headAndContent)') #11839

Merged
merged 6 commits into from
Oct 19, 2024

Conversation

icaliman
Copy link
Contributor

Changes

  • Fixed the error that we get in our SSR project. This error occurs after 2-3 seconds of page load.
image

Testing

Can not provide a minimal reproduction example.

Docs

Docs don't need change.

Copy link

changeset-bot bot commented Aug 26, 2024

🦋 Changeset detected

Latest commit: f9ac66d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Aug 26, 2024
@bluwy
Copy link
Member

bluwy commented Aug 26, 2024

I think it would be best if you can figure out how this happens in the first place. A repro or test would help us prevent regressing this in the future.

@icaliman
Copy link
Contributor Author

@bluwy I found the issue and added a test.

Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

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

great test!

@patheticGeek
Copy link

Hey! I have this same issue in prod, could we get this merged faster?

@matthewp
Copy link
Contributor

@bluwy can you take a look at this now that you've changed how the test work?

@bluwy
Copy link
Member

bluwy commented Oct 18, 2024

LGTM. We had an internal discussion whether this behaviour is desirable as we've not documented returning null as a valid pattern in Astro components, but after further testing, it looks like any values return are rendered as-is. As if you're doing <div>{<some-value>}</div> in an Astro file.

Given that I think handling null here make sense for now and we can revisit this behaviour again in the future. I'll rebase this PR before merging.

@bluwy bluwy merged commit ff522b9 into withastro:main Oct 19, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants