Skip to content

Commit 7adebac

Browse files
committed
Addressed comments
1 parent c1bff89 commit 7adebac

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

packages/react-client/src/ReactFlightClient.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,10 @@ function createElement(
766766
createBlockedChunk(response);
767767
handler.value = element;
768768
handler.chunk = blockedChunk;
769-
const freeze = Object.freeze.bind(Object, element.props);
770-
blockedChunk.then(freeze, freeze);
769+
if (__DEV__) {
770+
const freeze = Object.freeze.bind(Object, element.props);
771+
blockedChunk.then(freeze, freeze);
772+
}
771773
return createLazyChunkWrapper(blockedChunk);
772774
}
773775
} else if (__DEV__) {
@@ -1079,11 +1081,7 @@ function parseModelString(
10791081
if (value[0] === '$') {
10801082
if (value === '$') {
10811083
// A very common symbol.
1082-
if (
1083-
initializingHandler !== null &&
1084-
isArray(parentObject) &&
1085-
key === '0'
1086-
) {
1084+
if (initializingHandler !== null && key === '0') {
10871085
// We we already have an initializing handler and we're abound to enter
10881086
// a new element, we need to shadow it because we're now in a new scope.
10891087
// This is effectively the "begin" or "push" phase of Element parsing.

packages/react-reconciler/src/ReactFiberBeginWork.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4129,7 +4129,7 @@ function beginWork(
41294129
}
41304130
case Throw: {
41314131
// This represents a Component that threw in the reconciliation phase.
4132-
// So we'll rethrow here. This might be
4132+
// So we'll rethrow here. This might be a Thenable.
41334133
throw workInProgress.pendingProps;
41344134
}
41354135
}

0 commit comments

Comments
 (0)