bug fixed - check if the source URL is empty or nil

This commit is contained in:
CHEN Jiajie 2017-08-04 18:17:50 +08:00
parent 6b79866963
commit b4e17df95d

View File

@ -395,7 +395,7 @@ RCT_EXPORT_METHOD(openCropper:(NSDictionary *)options
- (NSDictionary*) createAttachmentResponse:(NSString*)filePath withSourceURL:(NSString*)sourceURL withLocalIdentifier:(NSString*)localIdentifier withFilename:(NSString*)filename withWidth:(NSNumber*)width withHeight:(NSNumber*)height withMime:(NSString*)mime withSize:(NSNumber*)size withData:(NSString*)data {
return @{
@"path": filePath,
@"sourceURL": sourceURL,
@"sourceURL": (sourceURL) ? sourceURL : @"",
@"localIdentifier": (localIdentifier) ? localIdentifier : @"",
@"filename": (filename) ? filename : @"",
@"width": width,