fixed blobmanager inserting nil when there's no mime type
Summary: Upon handling symbolication response when a redbox occurs, the blob manager inserted `nil` mime type because the response header doesn't specify any. This crashed the app with exception: ``` *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[4]' terminating with uncaught exception of type NSException ``` Reviewed By: shergin Differential Revision: D6945632 fbshipit-source-id: 9298bd2674447106763c73e1a5035417bd30f29c
This commit is contained in:
parent
fa0ac92b2c
commit
854c2330eb
|
@ -13,6 +13,7 @@
|
|||
|
||||
#import <React/RCTConvert.h>
|
||||
#import <React/RCTNetworking.h>
|
||||
#import <React/RCTUtils.h>
|
||||
#import <React/RCTWebSocketModule.h>
|
||||
|
||||
static NSString *const kBlobURIScheme = @"blob";
|
||||
|
@ -263,8 +264,8 @@ RCT_EXPORT_METHOD(release:(NSString *)blobId)
|
|||
@"blobId": [self store:data],
|
||||
@"offset": @0,
|
||||
@"size": @(data.length),
|
||||
@"name": [response suggestedFilename],
|
||||
@"type": [response MIMEType],
|
||||
@"name": RCTNullIfNil([response suggestedFilename]),
|
||||
@"type": RCTNullIfNil([response MIMEType]),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue