Skip to content

Commit

Permalink
Fix crash when parsing models with keyed fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jun 4, 2024
1 parent e54633d commit 0f8bab7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/react-server/src/ReactFlightServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,11 @@ function renderFragment(
REACT_FRAGMENT_TYPE,
task.keyPath,
{children},
// TODO: Pass debug stack and info?
__DEV__ ? null : undefined,
__DEV__ ? null : undefined,
// validated
__DEV__ ? 1 : undefined,
];
if (!task.implicitSlot) {
// If this was keyed inside a set. I.e. the outer Server Component was keyed
Expand Down Expand Up @@ -1279,6 +1284,11 @@ function renderAsyncFragment(
REACT_FRAGMENT_TYPE,
task.keyPath,
{children},
// TODO: Pass debug stack and info?
__DEV__ ? null : undefined,
__DEV__ ? null : undefined,
// validated
__DEV__ ? 1 : undefined,
];
if (!task.implicitSlot) {
// If this was keyed inside a set. I.e. the outer Server Component was keyed
Expand Down

0 comments on commit 0f8bab7

Please sign in to comment.