Skip to content

Commit d1d6184

Browse files
committed
extsion check createCapturedValue also
1 parent 40d5bee commit d1d6184

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/react-reconciler/src/ReactCapturedValue.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ export function createCapturedValue<T>(
5252
digest: ?string,
5353
stack: ?string,
5454
): CapturedValue<T> {
55-
if (!hasOwnProperty.call(value, '_componentStack')) {
55+
if (
56+
Object.isExtensible((value: any)) &&
57+
!hasOwnProperty.call(value, '_componentStack')
58+
) {
5659
(value: any)._componentStack = stack;
5760
}
5861
return {

0 commit comments

Comments
 (0)