Skip to content

Commit

Permalink
rm optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
salazarm committed Feb 17, 2022
1 parent 066b206 commit 7706ed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-server/src/ReactFlightServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -152,7 +152,7 @@ export function createRequest(
},
};
request.pendingChunks++;
const context = createRootContext(options?.context);
const context = createRootContext(options ? options.context : undefined);
const rootSegment = createSegment(request, model, context);
pingedSegments.push(rootSegment);
return request;
Expand Down

0 comments on commit 7706ed7

Please sign in to comment.