diff --git a/packages/react-server/src/ReactFlightServer.js b/packages/react-server/src/ReactFlightServer.js index 460385be089ef..54ff1d9111265 100644 --- a/packages/react-server/src/ReactFlightServer.js +++ b/packages/react-server/src/ReactFlightServer.js @@ -131,7 +131,7 @@ export function createRequest( options?: RequestOptions, ): Request { const pingedSegments = []; - const onError = options?.onError; + const onError = options ? options.onError : undefined; const request = { status: OPEN, fatalError: null,