File tree 1 file changed +6
-5
lines changed
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
282
282
}
283
283
284
284
- (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 ) {
290
286
[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];
291
292
}
292
293
}
293
294
You can’t perform that action at this time.
0 commit comments