Open GertjanReynaert opened 3 years ago
This is a legitimate issue breaking all test suites on the latest versions of React Native. Could any contributor in this project please approve this PR ?
Can second this is a huge issue for me too and this fixes it for me.
In our test suite (jest + react-native-testing-library)
Platform.constants
is an empty object. This was making the previous!Platform.constants
check pass, but caused a crash when trying to accessmajor
onreactNativeVersion
.This fix correctly checks if
reactNativeVersion
is present and is an object to avoid this issue.