Skip to content

Commit 9732259

Browse files
committed
$U -> $undefined
1 parent 489ecc4 commit 9732259

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
@@ -556,7 +556,8 @@ export function parseModelString(
556556
throw chunk.reason;
557557
}
558558
}
559-
case 'U': {
559+
case 'u': {
560+
// matches "$undefined"
560561
// Special encoding for `undefined` which can't be serialized as JSON otherwise.
561562
return undefined;
562563
}

packages/react-server/src/ReactFlightServer.js

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

550550
function serializeUndefined(): string {
551-
return '$U';
551+
return '$undefined';
552552
}
553553

554554
function serializeClientReference(

0 commit comments

Comments
 (0)