Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: gatsby@4.5.3
Choose a base ref
...
head repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: gatsby@4.5.4
Choose a head ref
  • 2 commits
  • 2 files changed
  • 3 contributors

Commits on Jan 19, 2022

  1. fix(gatsby): handle session storage not being available (#34525) (#34539

    )
    
    Co-authored-by: Dan Kirkham <herecy@live.co.uk>
    gatsbybot and herecydev authored Jan 19, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e69270b View commit details
  2. chore(release): Publish

     - gatsby@4.5.4
    LekoArts committed Jan 19, 2022
    Copy the full SHA
    80b3915 View commit details
Showing with 12 additions and 1 deletion.
  1. +11 −0 packages/gatsby/cache-dir/production-app.js
  2. +1 −1 packages/gatsby/package.json
11 changes: 11 additions & 0 deletions packages/gatsby/cache-dir/production-app.js
Original file line number Diff line number Diff line change
@@ -162,7 +162,18 @@ apiRunnerAsync(`onClientEntry`).then(() => {
)
}

// It's possible that sessionStorage can throw an exception if access is not granted, see https://github.com/gatsbyjs/gatsby/issues/34512
const getSessionStorage = () => {
try {
return sessionStorage
} catch {
return null
}
}

publicLoader.loadPage(browserLoc.pathname + browserLoc.search).then(page => {
const sessionStorage = getSessionStorage()

if (
page?.page?.webpackCompilationHash &&
page.page.webpackCompilationHash !== window.___webpackCompilationHash
2 changes: 1 addition & 1 deletion packages/gatsby/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby",
"description": "Blazing fast modern site generator for React",
"version": "4.5.3",
"version": "4.5.4",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"bin": {
"gatsby": "./cli.js"