File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/gatsby/cache-dir Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -353,7 +353,9 @@ const createComponentUrls = componentChunkName =>
353353export class ProdLoader extends BaseLoader {
354354 constructor ( asyncRequires , matchPaths ) {
355355 const loadComponent = chunkName =>
356- asyncRequires . components [ chunkName ] ( ) . then ( preferDefault )
356+ asyncRequires . components [ chunkName ]
357+ ? asyncRequires . components [ chunkName ] ( ) . then ( preferDefault )
358+ : Promise . resolve ( )
357359
358360 super ( loadComponent , matchPaths )
359361 }
Original file line number Diff line number Diff line change @@ -84,7 +84,10 @@ const navigate = (to, options = {}) => {
8484 if ( ! pageResources || pageResources . status === `error` ) {
8585 window . history . replaceState ( { } , `` , location . href )
8686 window . location = pathname
87+ clearTimeout ( timeoutId )
88+ return
8789 }
90+
8891 // If the loaded page has a different compilation hash to the
8992 // window, then a rebuild has occurred on the server. Reload.
9093 if ( process . env . NODE_ENV === `production` && pageResources ) {
You can’t perform that action at this time.
0 commit comments