diff --git a/packages/react-reconciler/src/ReactCapturedValue.js b/packages/react-reconciler/src/ReactCapturedValue.js index 77cee0e8f10bf..848474fe0a738 100644 --- a/packages/react-reconciler/src/ReactCapturedValue.js +++ b/packages/react-reconciler/src/ReactCapturedValue.js @@ -52,7 +52,10 @@ export function createCapturedValue( digest: ?string, stack: ?string, ): CapturedValue { - if (!hasOwnProperty.call(value, '_componentStack')) { + if ( + Object.isExtensible((value: any)) && + !hasOwnProperty.call(value, '_componentStack') + ) { (value: any)._componentStack = stack; } return {