From bdd8400057bf72f0796010552fe1b84e87e2727e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 5 Apr 2022 22:05:36 +0200 Subject: [PATCH] fix(rn) remove no longer needed hack RN no longer logs pprops in release builds. --- react/index.native.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/react/index.native.js b/react/index.native.js index b2c35be20..231d9b88c 100644 --- a/react/index.native.js +++ b/react/index.native.js @@ -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 { // 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);