From 4693170d6325bf691d3ddc75bc7102b458a4667d Mon Sep 17 00:00:00 2001 From: Rick Hanlon Date: Wed, 11 Dec 2019 08:35:10 -0800 Subject: [PATCH] Hotfix - register null logbox outside of dev Summary: Outside of __DEV__ the app may still try to use LogBox. We're going to fix that but until we do, if it tries to use LogBox outside of dev render null. Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D18932666 fbshipit-source-id: ef0f2542a295dc9332cae8b77faed78f8be350fe --- Libraries/ReactNative/AppRegistry.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Libraries/ReactNative/AppRegistry.js b/Libraries/ReactNative/AppRegistry.js index 06a93340bc8..6dc81373132 100644 --- a/Libraries/ReactNative/AppRegistry.js +++ b/Libraries/ReactNative/AppRegistry.js @@ -298,6 +298,14 @@ BatchedBridge.registerCallableModule('AppRegistry', AppRegistry); if (__DEV__) { const LogBoxInspector = require('../LogBox/LogBoxInspectorContainer').default; AppRegistry.registerComponent('LogBox', () => LogBoxInspector); +} else { + AppRegistry.registerComponent( + 'LogBox', + () => + function NoOp() { + return null; + }, + ); } module.exports = AppRegistry;