mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-26 18:53:19 +08:00
Workaround native module dependency in Jest environment
Reviewed By: josephsavona Differential Revision: D4225750 fbshipit-source-id: 6ac5a5cc1869232861977ea214970804acd7e39d
This commit is contained in:
committed by
Facebook Github Bot
parent
90284eb67d
commit
be5868dddb
@@ -15,7 +15,8 @@
|
||||
var Platform = {
|
||||
OS: 'android',
|
||||
get Version() {
|
||||
return require('NativeModules').AndroidConstants.Version;
|
||||
const AndroidConstants = require('NativeModules').AndroidConstants;
|
||||
return AndroidConstants && AndroidConstants.Version;
|
||||
},
|
||||
select: (obj: Object) => obj.android,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user