fixed bug with iOS cancel button (#1000)

This commit is contained in:
paul-hart 2019-05-16 02:49:52 -05:00 committed by Ivan Pusic
parent b55bc5b1bc
commit cc8aa64f47

View File

@ -854,7 +854,7 @@ RCT_EXPORT_METHOD(openCropper:(NSDictionary *)options
- (void)imageCropViewControllerDidCancelCrop:
(RSKImageCropViewController *)controller {
[self dismissCropper:controller selectionDone:NO completion:[self waitAnimationEnd:^{
if (self.currentSelectionMode == CROPPING || [[self.options objectForKey:@"cropping"] boolValue]) {
if (self.currentSelectionMode != PICKER && (self.currentSelectionMode == CROPPING || [[self.options objectForKey:@"cropping"] boolValue])) {
self.reject(ERROR_PICKER_CANCEL_KEY, ERROR_PICKER_CANCEL_MSG, nil);
}
}]];