Skip to content

Commit c0dd83f

Browse files
committed
$U -> $undefined
1 parent 87c52fd commit c0dd83f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/react-client/src/ReactFlightClient.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,8 @@ export function parseModelString(
553553
throw chunk.reason;
554554
}
555555
}
556-
case 'U': {
556+
case 'u': {
557+
// matches "$undefined"
557558
// Special encoding for `undefined` which can't be serialized as JSON otherwise.
558559
return undefined;
559560
}

packages/react-server/src/ReactFlightServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ function serializeProviderReference(name: string): string {
535535
}
536536

537537
function serializeUndefined(): string {
538-
return '$U';
538+
return '$undefined';
539539
}
540540

541541
function serializeClientReference(

0 commit comments

Comments
 (0)