We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 066b206 commit 7706ed7Copy full SHA for 7706ed7
packages/react-server/src/ReactFlightServer.js
@@ -131,7 +131,7 @@ export function createRequest(
131
options?: RequestOptions,
132
): Request {
133
const pingedSegments = [];
134
- const onError = options?.onError;
+ const onError = options ? options.onError : undefined;
135
const request = {
136
status: OPEN,
137
fatalError: null,
@@ -152,7 +152,7 @@ export function createRequest(
152
},
153
};
154
request.pendingChunks++;
155
- const context = createRootContext(options?.context);
+ const context = createRootContext(options ? options.context : undefined);
156
const rootSegment = createSegment(request, model, context);
157
pingedSegments.push(rootSegment);
158
return request;
0 commit comments