Skip to content

Commit

Permalink
Addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Jun 11, 2024
1 parent c1bff89 commit 7adebac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions packages/react-client/src/ReactFlightClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,10 @@ function createElement(
createBlockedChunk(response);
handler.value = element;
handler.chunk = blockedChunk;
const freeze = Object.freeze.bind(Object, element.props);
blockedChunk.then(freeze, freeze);
if (__DEV__) {
const freeze = Object.freeze.bind(Object, element.props);
blockedChunk.then(freeze, freeze);
}
return createLazyChunkWrapper(blockedChunk);
}
} else if (__DEV__) {
Expand Down Expand Up @@ -1079,11 +1081,7 @@ function parseModelString(
if (value[0] === '$') {
if (value === '$') {
// A very common symbol.
if (
initializingHandler !== null &&
isArray(parentObject) &&
key === '0'
) {
if (initializingHandler !== null && key === '0') {
// We we already have an initializing handler and we're abound to enter
// a new element, we need to shadow it because we're now in a new scope.
// This is effectively the "begin" or "push" phase of Element parsing.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -4129,7 +4129,7 @@ function beginWork(
}
case Throw: {
// This represents a Component that threw in the reconciliation phase.
// So we'll rethrow here. This might be
// So we'll rethrow here. This might be a Thenable.
throw workInProgress.pendingProps;
}
}
Expand Down

0 comments on commit 7adebac

Please sign in to comment.