We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29cfed5 commit 14cff12Copy full SHA for 14cff12
1 file changed
packages/fresh/src/runtime/client/partials.ts
@@ -306,11 +306,21 @@ async function fetchPartials(
306
}
307
308
309
+ try {
310
+ await applyPartials(res);
311
+ } catch (err) {
312
+ // When a redirect leads to a page without partials, fall back
313
+ // to a full page navigation instead of silently failing.
314
+ if (err instanceof NoPartialsError && res.redirected) {
315
+ location.href = actualUrl.href;
316
+ return;
317
+ }
318
+ throw err;
319
320
+
321
if (shouldNavigate) {
322
maybeUpdateHistory(actualUrl);
323
-
- await applyPartials(res);
324
325
326
interface PartialReviveCtx {
0 commit comments