Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function findDOMNode(component) {
if (baseFindDOMNode) {
try {
return baseFindDOMNode(component);
} catch (e) {
// findDOMNode will throw in react-test-renderer, see:
// See https://github.com/mobxjs/mobx-react/issues/216
// Is there a better heuristic?
return null;
}
}
return null;
}