File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -282,12 +282,13 @@ -(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker
282282}
283283
284284- (void ) closeImagePicker : (CDVInvokedUrlCommand *)command {
285- if (self.imagePicker .presentingViewController ) {
286- CDVPluginResult* pluginResult = nil ;
287- NSArray * emptyArray = [NSArray array ];
288- pluginResult = [CDVPluginResult resultWithStatus: CDVCommandStatus_OK messageAsArray: emptyArray];
289- [self .commandDelegate sendPluginResult: pluginResult callbackId: command.callbackId];
285+ if (self.imagePicker && self.imagePicker .presentingViewController ) {
290286 [self .imagePicker.presentingViewController dismissViewControllerAnimated: YES completion: nil ];
287+ CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus: CDVCommandStatus_OK messageAsBool: TRUE ];
288+ [self .commandDelegate sendPluginResult: pluginResult callbackId: command.callbackId];
289+ } else {
290+ CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus: CDVCommandStatus_OK messageAsBool: FALSE ];
291+ [self .commandDelegate sendPluginResult: pluginResult callbackId: command.callbackId];
291292 }
292293}
293294
You can’t perform that action at this time.
0 commit comments