Root-App / react-native-mock-render

a fork of react-native-mock that renders
MIT License
85 stars 50 forks source link

Fix Platform.select to return the default if the current OS isn't in the object passed #79

Closed andrewjstrominger closed 4 years ago

andrewjstrominger commented 4 years ago

Fixes this Platform.selectin our specs here: https://github.com/expo/react-native-action-sheet/blob/22753e0c0c765651403e6618069ccc8677738f5e/src/ActionSheet/TouchableNativeFeedbackSafe.tsx#L17-L20

This select implementation matches the actual react-native implementation: https://github.com/facebook/react-native/blob/master/Libraries/Utilities/Platform.ios.js#L62-L64