mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 02:04:55 +00:00
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…
x
Reference in New Issue
Block a user