Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 9728155

Browse files
fulvioabrahaofacebook-github-bot
authored andcommitted
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
1 parent fb47b70 commit 9728155

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin

iOS/Plugins/FlipperKitDatabasesPlugin/FlipperKitDatabasesPlugin/ObjectMapper.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ + (NSDictionary*)databaseExecuteSqlResponseToDictionary:
127127
}
128128

129129
+ (NSDictionary*)objectAndTypeToFlipperObject:(id)object {
130-
if (!object) {
130+
if (!object || [object isKindOfClass:[NSNull class]]) {
131131
return @{@"type" : @"null"};
132132
} else if ([object isKindOfClass:[NSNumber class]]) {
133133
NSNumber* number = (NSNumber*)object;

0 commit comments

Comments
 (0)