fix(rn) remove no longer needed hack

RN no longer logs pprops in release builds.
This commit is contained in:
Saúl Ibarra Corretgé 2022-04-05 22:05:36 +02:00 committed by Saúl Ibarra Corretgé
parent 23f40db889
commit bdd8400057
1 changed files with 1 additions and 24 deletions

View File

@ -13,10 +13,7 @@ import { AppRegistry } from 'react-native';
import { App } from './features/app/components';
import { _initLogging } from './features/base/logging/functions';
import JitsiThemePaperProvider
from './features/base/ui/components/JitsiThemeProvider';
declare var __DEV__;
import JitsiThemePaperProvider from './features/base/ui/components/JitsiThemeProvider';
/**
* The type of the React {@code Component} props of {@link Root}.
@ -56,25 +53,5 @@ class Root extends PureComponent<Props> {
// Initialize logging.
_initLogging();
// HORRIBLE HACK ALERT! React Native logs the initial props with `console.log`. Here we are quickly patching it
// to avoid logging potentially sensitive information.
if (!__DEV__) {
/* eslint-disable */
const __orig_console_log = console.log;
const __orig_appregistry_runapplication = AppRegistry.runApplication;
AppRegistry.runApplication = (...args) => {
// $FlowExpectedError
console.log = () => {};
__orig_appregistry_runapplication(...args);
// $FlowExpectedError
console.log = __orig_console_log;
};
/* eslint-enable */
}
// Register the main/root Component of JitsiMeetView.
AppRegistry.registerComponent('App', () => Root);