File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -568,5 +568,9 @@ export const publicLoader = {
568568export default publicLoader
569569
570570export function getStaticQueryResults ( ) {
571- return instance . staticQueryDb
571+ if ( instance ) {
572+ return instance . staticQueryDb
573+ } else {
574+ return { }
575+ }
572576}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ This will help the dev environment more closely mimic builds so you'll catch bui
7171
7272Try out develop SSR *today* by running your site with it enabled:
7373
74- GATSBY_EXPERIMENT_DEV_SSR =true gatsby develop
74+ GATSBY_EXPERIMENTAL_DEV_SSR =true gatsby develop
7575
7676Please let us know how it goes good, bad, or otherwise at gatsby.dev/dev-ssr-feedback
7777 ` ,
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import _ from "lodash"
33
44import { startListener } from "../../bootstrap/requires-writer"
55import { findPageByPath } from "../find-page-by-path"
6+ import { getPageData as getPageDataExperimental } from "../get-page-data"
67
78const startWorker = ( ) : any => {
89 const newWorker = new JestWorker ( require . resolve ( `./render-dev-html-child` ) , {
@@ -63,6 +64,9 @@ export const renderDevHTML = ({
6364 isClientOnlyPage = true
6465 }
6566
67+ // Ensure the query has been run and written out.
68+ await getPageDataExperimental ( pageObj . path )
69+
6670 try {
6771 const htmlString = await worker . renderHTML ( {
6872 path,
You can’t perform that action at this time.
0 commit comments