Skip to content

Commit d9135f0

Browse files
committed
Allow returning a temporary reference from an async function in ReactFlightServerTemporaryReferences.js
1 parent fe81314 commit d9135f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-server/src/ReactFlightServerTemporaryReferences.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ const proxyHandlers = {
7070
`Instead, you can export a Client Component wrapper ` +
7171
`that itself renders a Client Context Provider.`,
7272
);
73+
// Allow returning a temporary reference from an async function
74+
case 'then':
75+
return undefined;
7376
}
7477
throw new Error(
7578
// eslint-disable-next-line react-internal/safe-string-coercion

0 commit comments

Comments
 (0)