Consider NSNull object as type=null in ObjectMapper.
Summary: nil objects from sqlite is NSNull object, so we need to consider this case in the ObjectMapper as well. Differential Revision: D48394360 fbshipit-source-id: 61bcdb03cb4cbf17a2fef000a5a61ac2f2c035dd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fb47b70d36
commit
9728155cbf
@@ -127,7 +127,7 @@ static NSString* const UNKNOWN_BLOB_LABEL_FORMAT = @"{%d-byte %@ blob}";
|
||||
}
|
||||
|
||||
+ (NSDictionary*)objectAndTypeToFlipperObject:(id)object {
|
||||
if (!object) {
|
||||
if (!object || [object isKindOfClass:[NSNull class]]) {
|
||||
return @{@"type" : @"null"};
|
||||
} else if ([object isKindOfClass:[NSNumber class]]) {
|
||||
NSNumber* number = (NSNumber*)object;
|
||||
|
||||
Reference in New Issue
Block a user