NuvioStreaming/patches/react-native+0.81.4.patch
2025-10-15 01:51:57 +05:30

30 lines
1.2 KiB
Diff

diff --git a/node_modules/react-native/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js b/node_modules/react-native/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js
index 63701e7..d3498da 100644
--- a/node_modules/react-native/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js
+++ b/node_modules/react-native/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js
@@ -73,14 +73,23 @@ function deepFreezeAndThrowOnMutationInDev<T: {...} | Array<mixed>>(
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
* LTI update could not be added via codemod */
function throwOnImmutableMutation(key: empty, value) {
- throw Error(
- 'You attempted to set the key `' +
+ // Suppressed mutation error for development
+ console.warn(
+ 'Attempted to set the key `' +
key +
'` with the value `' +
JSON.stringify(value) +
'` on an object that is meant to be immutable ' +
'and has been frozen.',
);
+ // throw Error(
+ // 'You attempted to set the key `' +
+ // key +
+ // '` with the value `' +
+ // JSON.stringify(value) +
+ // '` on an object that is meant to be immutable ' +
+ // 'and has been frozen.',
+ // );
}
function identity(value: mixed) {