From 36fd36bd38205492b0c83525d4872867d7b2d008 Mon Sep 17 00:00:00 2001 From: Ran Greenberg Date: Tue, 20 Jun 2017 11:27:51 +0300 Subject: [PATCH] return gracefully when try to invoke resizeImage on Android --- src/CameraKitGallery.ios.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CameraKitGallery.ios.js b/src/CameraKitGallery.ios.js index 1baaca2..741d8a4 100644 --- a/src/CameraKitGallery.ios.js +++ b/src/CameraKitGallery.ios.js @@ -46,6 +46,12 @@ async function resizeImage(image = {}, quality = 'original') { if (quality === 'original') { return images; } + + if (Platform.os === 'android') { + console.log('resize image not supported on Android'); + return; + } + const ans = await CKGallery.resizeImage(image, quality); return ans; }