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
This commit is contained in:
Rick Hanlon
2019-12-11 08:35:10 -08:00
parent 51dcb0195b
commit 4693170d63
+8
View File
@@ -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;