mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-26 05:15:49 +08:00
[ReactNative] Use RCTNullIfNill and (id)kCFNull
Summary: @public Use consistent `null` handling: `value || null` -> `RCTNullIfNil(value)` `value == null ? nil : value` -> `RCTNilIfNull(value)` `[NSNull null]` -> `(id)kCFNull` Test Plan: The tests should be enough.
This commit is contained in:
@@ -436,7 +436,7 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
NSArray *responseJSON = @[
|
||||
request.requestID,
|
||||
error.localizedDescription ?: [NSNull null],
|
||||
RCTNullIfNil(error.localizedDescription),
|
||||
];
|
||||
|
||||
[_bridge.eventDispatcher sendDeviceEventWithName:@"didCompleteNetworkResponse"
|
||||
|
||||
Reference in New Issue
Block a user