react-native-macos/Libraries/TypeSafety
Alexander Kawrykow 15434c7c43 Guard against null values in object parameters for bridged methods
Summary:
Handles the case when a value in an object parameter of a turbo module spec is null (even if the type is nullable).

For example, given:
```
export interface Spec extends TurboModule {
  +myFunc: ({|
    foo: ?string,
  |}) => void;
}
```
and calling `NativeModule.myFunc({foo: null})`, we see an error like:
```
JSON value '<null>' of type NSNull cannot be converted to NSString
```
Guarding against this by converting NSNull's to nils

## Changelog:

[iOS] [Fixed] - Fix crash when passing null value in object parameter of bridged method

Reviewed By: fkgozali

Differential Revision: D20591590

fbshipit-source-id: fdb90f34131427a235f2e3c99147bf1e6a9c6732
2020-03-23 17:21:00 -07:00
..
RCTConvertHelpers.h Implement RCTConvertOptionalVecToArray(const folly::Optional<ContainerT> &vec) 2019-11-04 16:07:24 -08:00
RCTConvertHelpers.mm Guard against null values in object parameters for bridged methods 2020-03-23 17:21:00 -07:00
RCTTypeSafety.podspec Updating the URLs to point at new domain name reactnative.dev 2020-02-24 13:09:11 -08:00
RCTTypedModuleConstants.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTypedModuleConstants.mm Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00