Unbreak UIManager.takeSnapshot

Reviewed By: majak

Differential Revision: D3729478

fbshipit-source-id: 35869e4327debae78f36638694d09f30c6478661
This commit is contained in:
Pieter De Baets 2016-08-17 10:22:51 -07:00 committed by Facebook Github Bot 1
parent 3d7fe3e6d3
commit e4ac66b0ee
1 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,8 @@ const invariant = require('fbjs/lib/invariant');
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
* 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,
},
) {
const _takeSnapshot = UIManager.takeSnapshot;
if (!_takeSnapshot) {
console.warn('UIManager.takeSnapshot is not available on this platform');
return;