File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
packages/react-router/lib/dom/ssr Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " react-router " : patch
3
+ ---
4
+
5
+ Don't trigger an ` ErrorBoundary ` UI before the reload when we detect a manifest verison mismatch in Lazy Route Discovery
Original file line number Diff line number Diff line change @@ -254,7 +254,13 @@ export async function fetchAndApplyManifestPatches(
254
254
255
255
sessionStorage . setItem ( MANIFEST_VERSION_STORAGE_KEY , manifest . version ) ;
256
256
window . location . href = errorReloadPath ;
257
- throw new Error ( "Detected manifest version mismatch, reloading..." ) ;
257
+ console . warn ( "Detected manifest version mismatch, reloading..." ) ;
258
+
259
+ // Stall here and let the browser reload and avoid triggering a flash of
260
+ // an ErrorBoundary if we threw (same thing we do in `loadRouteModule()`)
261
+ await new Promise ( ( ) => {
262
+ // check out of this hook cause the DJs never gonna re[s]olve this
263
+ } ) ;
258
264
} else if ( res . status >= 400 ) {
259
265
throw new Error ( await res . text ( ) ) ;
260
266
}
You can’t perform that action at this time.
0 commit comments