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