mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 05:34:15 +00:00
Workaround native module dependency in Jest environment
Reviewed By: josephsavona Differential Revision: D4225750 fbshipit-source-id: 6ac5a5cc1869232861977ea214970804acd7e39d
This commit is contained in:
parent
90284eb67d
commit
be5868dddb
@ -15,7 +15,8 @@
|
|||||||
var Platform = {
|
var Platform = {
|
||||||
OS: 'android',
|
OS: 'android',
|
||||||
get Version() {
|
get Version() {
|
||||||
return require('NativeModules').AndroidConstants.Version;
|
const AndroidConstants = require('NativeModules').AndroidConstants;
|
||||||
|
return AndroidConstants && AndroidConstants.Version;
|
||||||
},
|
},
|
||||||
select: (obj: Object) => obj.android,
|
select: (obj: Object) => obj.android,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user