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): Add null context check #24904

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Conversation

ascorbic
Copy link
Contributor

Because typeof null === "object" this would throw if page context was null. This adds a truthiness check. This is enough, because context can only be JSON-safe types.

Fixes #24884

@ascorbic ascorbic requested a review from a team as a code owner June 10, 2020 11:07
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 10, 2020
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

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

💥

@sidharthachatterjee sidharthachatterjee added bot: merge on green Gatsbot will merge these PRs automatically when all tests passes and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 10, 2020
@gatsbybot gatsbybot merged commit b554bd5 into master Jun 10, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix/handle-null-context branch June 10, 2020 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New version of gatsby throws when context is null
3 participants