@react-native/js-polyfills 0.74.0 → 0.75.0-main

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/console.js +5 -1
  2. package/package.json +1 -1
package/console.js CHANGED
@@ -554,6 +554,7 @@ if (global.nativeLoggingHook) {
554
554
  }
555
555
 
556
556
  global.console = {
557
+ ...(originalConsole ?? {}),
557
558
  error: getNativeLogFunction(LOG_LEVELS.error),
558
559
  info: getNativeLogFunction(LOG_LEVELS.info),
559
560
  log: getNativeLogFunction(LOG_LEVELS.info),
@@ -578,7 +579,10 @@ if (global.nativeLoggingHook) {
578
579
  if (__DEV__ && originalConsole) {
579
580
  Object.keys(console).forEach(methodName => {
580
581
  const reactNativeMethod = console[methodName];
581
- if (originalConsole[methodName]) {
582
+ if (
583
+ originalConsole[methodName] &&
584
+ reactNativeMethod !== originalConsole[methodName]
585
+ ) {
582
586
  console[methodName] = function () {
583
587
  originalConsole[methodName](...arguments);
584
588
  reactNativeMethod.apply(console, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/js-polyfills",
3
- "version": "0.74.0",
3
+ "version": "0.75.0-main",
4
4
  "description": "Polyfills for React Native.",
5
5
  "license": "MIT",
6
6
  "repository": {