From dd8c5c1578980f8e1486f1de6aa51637abee68fe Mon Sep 17 00:00:00 2001 From: Armin Primadi Date: Wed, 31 May 2017 18:31:31 +0700 Subject: [PATCH] Fix fixOrientation in captureStill always returns true (it returns NSCFBoolean which evaluates to true even if the value is false) (#729) --- ios/RCTCameraManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/RCTCameraManager.m b/ios/RCTCameraManager.m index a8a902a..2310080 100644 --- a/ios/RCTCameraManager.m +++ b/ios/RCTCameraManager.m @@ -602,7 +602,7 @@ RCT_EXPORT_METHOD(hasFlash:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRej if ([options objectForKey:@"rotation"]) { float rotation = [[options objectForKey:@"rotation"] floatValue]; rotatedCGImage = [self newCGImageRotatedByAngle:cgImage angle:rotation]; - } else if ([options objectForKey:@"fixOrientation"]){ + } else if ([[options objectForKey:@"fixOrientation"] boolValue] == YES) { // Get metadata orientation int metadataOrientation = [[imageMetadata objectForKey:(NSString *)kCGImagePropertyOrientation] intValue];