Skip to content

Commit 7706ed7

Browse files
committed
rm optional chaining
1 parent 066b206 commit 7706ed7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-server/src/ReactFlightServer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export function createRequest(
131131
options?: RequestOptions,
132132
): Request {
133133
const pingedSegments = [];
134-
const onError = options?.onError;
134+
const onError = options ? options.onError : undefined;
135135
const request = {
136136
status: OPEN,
137137
fatalError: null,
@@ -152,7 +152,7 @@ export function createRequest(
152152
},
153153
};
154154
request.pendingChunks++;
155-
const context = createRootContext(options?.context);
155+
const context = createRootContext(options ? options.context : undefined);
156156
const rootSegment = createSegment(request, model, context);
157157
pingedSegments.push(rootSegment);
158158
return request;

0 commit comments

Comments
 (0)