Skip to content

Commit

Permalink
$U -> $undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Mar 9, 2023
1 parent 489ecc4 commit 9732259
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/react-client/src/ReactFlightClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,8 @@ export function parseModelString(
throw chunk.reason;
}
}
case 'U': {
case 'u': {
// matches "$undefined"
// Special encoding for `undefined` which can't be serialized as JSON otherwise.
return undefined;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-server/src/ReactFlightServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ function serializeProviderReference(name: string): string {
}

function serializeUndefined(): string {
return '$U';
return '$undefined';
}

function serializeClientReference(
Expand Down

0 comments on commit 9732259

Please sign in to comment.