Skip to content

Commit b3337fc

Browse files
authored
always include additional route patches in payload to aid in SPA / "lazy" discovery cases (#13978)
1 parent f358a1e commit b3337fc

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

.changeset/fuzzy-bottles-itch.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/react-router/lib/rsc/server.rsc.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -894,14 +894,12 @@ async function getRenderPayload(
894894
})
895895
);
896896

897-
let patchesPromise = !isDataRequest
898-
? getAdditionalRoutePatches(
899-
[staticContext.location.pathname],
900-
routes,
901-
basename,
902-
staticContext.matches.map((m) => m.route.id)
903-
)
904-
: undefined;
897+
let patchesPromise = getAdditionalRoutePatches(
898+
[staticContext.location.pathname],
899+
routes,
900+
basename,
901+
staticContext.matches.map((m) => m.route.id)
902+
);
905903

906904
let [matches, patches] = await Promise.all([matchesPromise, patchesPromise]);
907905

0 commit comments

Comments
 (0)