forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle null values coming from JS (facebook#49250)
Summary: Pull Request resolved: facebook#49250 The TurboModule System decided to ignore the Null values when they are coming to JS. However, in iOS, null value can be mapped to `[NSNull null];` and this value is a valid value that can be used on the native side. In the old architecture, when the user were sending a null value from JS to a native module, the Native side was receiving the value. In the New Architecture, the value was stripped away. This change allow us to handle the `null` value properly in the interop layer, to restore the usage of legacy modules in the New Arch. I also tried with a more radical approach, but several tests were crashing because some modules do not know how to handle `NSNull`. See discussion happening here: invertase/react-native-firebase#8144 (comment) ## Changelog: [iOS][Changed] - Properly handle `null` values coming from NativeModules. Reviewed By: sammy-SC Differential Revision: D69301396 fbshipit-source-id: be275185e2643092f6c3dc2481fe9381bbcf69e9
- Loading branch information
1 parent
e74246b
commit d423679
Showing
3 changed files
with
36 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters