Fix fixOrientation in captureStill always returns true (it returns NSCFBoolean which evaluates to true even if the value is false) (#729)

This commit is contained in:
Armin Primadi 2017-05-31 18:31:31 +07:00 committed by Nick Pomfret
parent 41d3292b6b
commit dd8c5c1578
1 changed files with 1 additions and 1 deletions

View File

@ -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];