Skip to content

Commit 57357e6

Browse files
refactor(ios): drop unreachable NSNull fallback in OSDecodeNullSentinels
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent aba3d85 commit 57357e6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ios/RCTOneSignal/RCTOneSignalEventEmitter.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
// Recursively walks `value`, returning a copy with any string equal to the
1818
// sentinel replaced by `[NSNull null]`. Containers are rebuilt; primitives
1919
// are returned as-is.
20-
static id _Nullable OSDecodeNullSentinels(id _Nullable value) {
20+
static id OSDecodeNullSentinels(id value) {
2121
if ([value isKindOfClass:[NSDictionary class]]) {
2222
NSDictionary *dict = (NSDictionary *)value;
2323
NSMutableDictionary *out = [NSMutableDictionary dictionaryWithCapacity:dict.count];
2424
[dict enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
25-
out[key] = OSDecodeNullSentinels(obj) ?: [NSNull null];
25+
out[key] = OSDecodeNullSentinels(obj);
2626
}];
2727
return out;
2828
}
2929
if ([value isKindOfClass:[NSArray class]]) {
3030
NSArray *arr = (NSArray *)value;
3131
NSMutableArray *out = [NSMutableArray arrayWithCapacity:arr.count];
3232
for (id item in arr) {
33-
[out addObject:OSDecodeNullSentinels(item) ?: [NSNull null]];
33+
[out addObject:OSDecodeNullSentinels(item)];
3434
}
3535
return out;
3636
}

0 commit comments

Comments
 (0)