Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 54c21ac

Browse files
committed
add NSSet type to RCTConvert
Summary: Add support for NSSet type Closes facebook#1938 Github Author: Kostiantyn Koval <[email protected]>
1 parent ffaf162 commit 54c21ac

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

React/Base/RCTConvert.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
+ (NSUInteger)NSUInteger:(id)json;
4040

4141
+ (NSArray *)NSArray:(id)json;
42+
+ (NSSet *)NSSet:(id)json;
4243
+ (NSDictionary *)NSDictionary:(id)json;
4344
+ (NSString *)NSString:(id)json;
4445
+ (NSNumber *)NSNumber:(id)json;

React/Base/RCTConvert.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ void RCTLogConvertError(id json, const char *type)
3535
RCT_NUMBER_CONVERTER(NSUInteger, unsignedIntegerValue)
3636

3737
RCT_CUSTOM_CONVERTER(NSArray *, NSArray, [NSArray arrayWithArray:json])
38+
RCT_CUSTOM_CONVERTER(NSSet *, NSSet, [NSSet setWithArray:json])
3839
RCT_CUSTOM_CONVERTER(NSDictionary *, NSDictionary, [NSDictionary dictionaryWithDictionary:json])
3940
RCT_CONVERTER(NSString *, NSString, description)
4041

0 commit comments

Comments
 (0)