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(gatsby): handle loaded page being potentially undefined #34488

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Jan 13, 2022

Description

I introduced regression in #34225 for cases when loader.loadPage returns undefined. This adds just check wether nested properties are defined.

Proper error handling is below, but we still want to potentially check for webpackCompilationHash before that (to potentially reload instead of just throwing error)

Related Issues

Fixes #34484

@pieh pieh added the topic: frontend Relates to frontend issues (e.g. reach/router, gatsby-link, page-loading, asset-loading, navigation) label Jan 13, 2022
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 13, 2022
@pieh pieh removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 13, 2022
@LekoArts LekoArts merged commit 59cd704 into master Jan 14, 2022
@LekoArts LekoArts deleted the fix/handle-loadPage-returning-falsy branch January 14, 2022 07:50
marvinjude pushed a commit that referenced this pull request Jan 17, 2022
tyhopp pushed a commit that referenced this pull request Jan 17, 2022
…34509)

(cherry picked from commit 59cd704)

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
@marvinjude
Copy link
Contributor

Published in gatsby@4.5.3

pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: frontend Relates to frontend issues (e.g. reach/router, gatsby-link, page-loading, asset-loading, navigation)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read properties of undefined (reading 'webpackCompilationHash')
3 participants