Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/react-native/Libraries/LogBox/UI/LogBoxInspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* @format
*/

import Clipboard from '../../Components/Clipboard/Clipboard';
import Keyboard from '../../Components/Keyboard/Keyboard';
import View from '../../Components/View/View';
import StyleSheet from '../../StyleSheet/StyleSheet';
Expand Down Expand Up @@ -98,6 +97,9 @@ export default function LogBoxInspector(props: Props): React.Node {
}
}

// Lazy-require to avoid crashing in environments where the native
// Clipboard module is unavailable (e.g. Fantom integration tests).
const Clipboard = require('../../Components/Clipboard/Clipboard').default;
Clipboard.setString(parts.join('\n'));
}

Expand Down
Loading