Fix a warning about SnapshotView
Reviewed By: majak Differential Revision: D2553669 fb-gh-sync-id: 2a2b47f9cf7a75403e4e2541b32a4b141b3d08be
This commit is contained in:
parent
b09e92e1b3
commit
59e670e453
|
@ -14,7 +14,7 @@
|
|||
var Platform = require('Platform');
|
||||
var React = require('React');
|
||||
var StyleSheet = require('StyleSheet');
|
||||
var { TestModule } = require('NativeModules');
|
||||
var { TestModule, UIManager } = require('NativeModules');
|
||||
var View = require('View');
|
||||
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
@ -51,7 +51,10 @@ var style = StyleSheet.create({
|
|||
},
|
||||
});
|
||||
|
||||
var RCTSnapshot = Platform.OS === 'ios' ?
|
||||
// Verify that RCTSnapshot is part of the UIManager since it is only loaded
|
||||
// if you have linked against RCTTest like in tests, otherwise we will have
|
||||
// a warning printed out
|
||||
var RCTSnapshot = UIManager.RCTSnapshot ?
|
||||
requireNativeComponent('RCTSnapshot', SnapshotViewIOS) :
|
||||
View;
|
||||
|
||||
|
|
Loading…
Reference in New Issue