mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 20:15:11 +00:00
Unbreak UIManager.takeSnapshot
Reviewed By: majak Differential Revision: D3729478 fbshipit-source-id: 35869e4327debae78f36638694d09f30c6478661
This commit is contained in:
parent
3d7fe3e6d3
commit
e4ac66b0ee
@ -20,6 +20,8 @@ const invariant = require('fbjs/lib/invariant');
|
|||||||
|
|
||||||
invariant(UIManager, 'UIManager is undefined. The native module config is probably incorrect.');
|
invariant(UIManager, 'UIManager is undefined. The native module config is probably incorrect.');
|
||||||
|
|
||||||
|
const _takeSnapshot = UIManager.takeSnapshot;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Capture an image of the screen, window or an individual view. The image
|
* Capture an image of the screen, window or an individual view. The image
|
||||||
* will be stored in a temporary file that will only exist for as long as the
|
* will be stored in a temporary file that will only exist for as long as the
|
||||||
@ -46,7 +48,6 @@ UIManager.takeSnapshot = async function(
|
|||||||
quality ?: number,
|
quality ?: number,
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const _takeSnapshot = UIManager.takeSnapshot;
|
|
||||||
if (!_takeSnapshot) {
|
if (!_takeSnapshot) {
|
||||||
console.warn('UIManager.takeSnapshot is not available on this platform');
|
console.warn('UIManager.takeSnapshot is not available on this platform');
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user