Skip to content

Commit 8b26d54

Browse files
committed
fix: improve null checks in selectPlacements method
1 parent ad7a7c7 commit 8b26d54

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ios/RNMParticle/RNMPRokt.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ - (void)setMethodQueue:(dispatch_queue_t)methodQueue
6161
// New Architecture Implementation
6262
- (void)selectPlacements:(NSString *)identifer
6363
attributes:(NSDictionary *)attributes
64-
placeholders:(NSDictionary * _Nullable)placeholders
64+
placeholders:(NSDictionary *)placeholders
6565
roktConfig:(JS::NativeMPRokt::RoktConfigType &)roktConfig
66-
fontFilesMap:(NSDictionary * _Nullable)fontFilesMap
66+
fontFilesMap:(NSDictionary *)fontFilesMap
6767
{
6868
NSMutableDictionary *finalAttributes = [self convertToMutableDictionaryOfStrings:attributes];
6969

7070
// Convert JS struct to NSDictionary for internal use
7171
NSMutableDictionary *roktConfigDict = [[NSMutableDictionary alloc] init];
72-
if (roktConfig.cacheConfig().has_value()) {
72+
if (&roktConfig != nullptr && roktConfig.cacheConfig().has_value()) {
7373
NSMutableDictionary *cacheConfigDict = [[NSMutableDictionary alloc] init];
7474
auto cacheConfig = roktConfig.cacheConfig().value();
7575
if (cacheConfig.cacheDurationInSeconds().has_value()) {

0 commit comments

Comments
 (0)