[add] default option for Platform.select

See: https://github.com/facebook/react-native/commit/f30ab35e9278f120247f49d6a355e263cc357946
This commit is contained in:
Bruno Lemos
2017-03-17 20:45:54 -03:00
committed by Nicolas Gallagher
parent 976320916e
commit e6f00f7592
+1 -1
View File
@@ -1,6 +1,6 @@
const Platform = {
OS: 'web',
select: (obj: Object) => obj.web
select: (obj: Object) => 'web' in obj ? obj.web : obj.default
};
module.exports = Platform;