Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: use RCTConvert to interpret options
  • Loading branch information
mvayngrib committed Apr 5, 2019
commit 1d144e8bfd6e69847c2435100dc53fa98d2e0bbf
4 changes: 2 additions & 2 deletions RNNotifications/RNNotifications.m
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ - (void)startObserving

RCT_EXPORT_METHOD(requestPermissionsWithCategories:(NSDictionary *)json)
{
NSArray *catsArr = [json valueForKey:@"categories"];
BOOL requestRemote = [json valueForKey:@"remote"];
NSArray *catsArr = [RCTConvert NSArray:json[@"categories"]];
BOOL requestRemote = [RCTConvert BOOL:json[@"remote"]];
NSSet* categories = [RNNotifications interpretNotificationCategories:catsArr];
[self requestPermissionsWithCategoriesInternal:categories requestRemote:requestRemote];
}
Expand Down