fix(rn) remove no longer needed hack
RN no longer logs pprops in release builds.
This commit is contained in:
parent
23f40db889
commit
bdd8400057
|
@ -13,10 +13,7 @@ import { AppRegistry } from 'react-native';
|
||||||
|
|
||||||
import { App } from './features/app/components';
|
import { App } from './features/app/components';
|
||||||
import { _initLogging } from './features/base/logging/functions';
|
import { _initLogging } from './features/base/logging/functions';
|
||||||
import JitsiThemePaperProvider
|
import JitsiThemePaperProvider from './features/base/ui/components/JitsiThemeProvider';
|
||||||
from './features/base/ui/components/JitsiThemeProvider';
|
|
||||||
|
|
||||||
declare var __DEV__;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the React {@code Component} props of {@link Root}.
|
* The type of the React {@code Component} props of {@link Root}.
|
||||||
|
@ -56,25 +53,5 @@ class Root extends PureComponent<Props> {
|
||||||
// Initialize logging.
|
// Initialize logging.
|
||||||
_initLogging();
|
_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.
|
// Register the main/root Component of JitsiMeetView.
|
||||||
AppRegistry.registerComponent('App', () => Root);
|
AppRegistry.registerComponent('App', () => Root);
|
||||||
|
|
Loading…
Reference in New Issue