From d7bf02f2b3b986c0c0f3de7f73d729a821b1ce65 Mon Sep 17 00:00:00 2001 From: Zayin Krige Date: Mon, 31 Jul 2017 15:30:39 +0200 Subject: [PATCH] Fix crash when taking photo from camera Dictionary was being initialized with nil values which causes crash in Obj-C. I've put a ternary in that will send empty string values for the possible nil values --- ios/ImageCropPicker.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/ImageCropPicker.m b/ios/ImageCropPicker.m index 8adb4a937..f8fc58846 100644 --- a/ios/ImageCropPicker.m +++ b/ios/ImageCropPicker.m @@ -579,8 +579,8 @@ - (void) processSingleImagePick:(UIImage*)image withViewController:(UIViewContro // Alert.alert in the .then() handler. [viewController dismissViewControllerAnimated:YES completion:[self waitAnimationEnd:^{ self.resolve([self createAttachmentResponse:filePath - withLocalIdentifier: localIdentifier - withFilename: filename + withLocalIdentifier:(localIdentifier) ? localIdentifier : @"" + withFilename:(filename) ? filename : @"" withWidth:imageResult.width withHeight:imageResult.height withMime:imageResult.mime