mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user