Uh oh!
There was an error while loading. Please reload this page.
Handle null params in the Interop TM layer - #49873
Conversation
Summary: In the old architecture, when we were passing a `null` value as a parameter in a function that accepted nullable parameter, the null value was mapped to `nil` on iOS. After my changes in [d423679](d423679), in the New Architecture, through the interop layer, legacy modules were receiving an `NSNull` object instead of nil. This was breaking those modules which started crashing or observing undesired behavior. This change fixes the issue by making sure that, in those cases, a `nil` value is passed. Note that nested objects in the old architecture were correctly receiving NSNull, so nested objects were behaving correctly already. ## Changelog: [iOS][Fixed] - Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules Differential Revision: D70723460
facebook-github-bot
commented
Mar 6, 2025
This pull request was exported from Phabricator. Differential Revision: D70723460 |
facebook-github-bot
commented
Mar 6, 2025
This pull request was exported from Phabricator. Differential Revision: D70723460 |
52c73e0 to
40d5002Comparefacebook-github-bot
commented
Mar 7, 2025
This pull request has been merged in 619d5df. |
react-native-bot
commented
Mar 7, 2025
This pull request was successfully merged by @cipolleschi in 619d5df When will my fix make it into a release? | How to file a pick request? |
mikehardy
commented
Mar 18, 2025
This worked great for me in testing, I noticed that the 77 / 78 / 79 branches carried the iOS release mode crash issue but did not have this fixed, so I made pick requests Hopefully did the right thing with those, thanks for this patch |
Summary: Pull Request resolved: #49873 In the old architecture, when we were passing a `null` value as a parameter in a function that accepted nullable parameter, the null value was mapped to `nil` on iOS. After my changes in [d423679](d423679), in the New Architecture, through the interop layer, legacy modules were receiving an `NSNull` object instead of nil. This was breaking those modules which started crashing or observing undesired behavior. This change fixes the issue by making sure that, in those cases, a `nil` value is passed. Note that nested objects in the old architecture were correctly receiving NSNull, so nested objects were behaving correctly already. ## Changelog: [iOS][Fixed] - Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules Reviewed By: javache Differential Revision: D70723460 fbshipit-source-id: 384f48b6dbb3f54c369b31b6d2ee06069fa3591c
react-native-bot
commented
Mar 18, 2025
This pull request was successfully merged by @cipolleschi in 29e39d1 When will my fix make it into a release? | How to file a pick request? |
Summary: Pull Request resolved: #49873 In the old architecture, when we were passing a `null` value as a parameter in a function that accepted nullable parameter, the null value was mapped to `nil` on iOS. After my changes in [d423679](d423679), in the New Architecture, through the interop layer, legacy modules were receiving an `NSNull` object instead of nil. This was breaking those modules which started crashing or observing undesired behavior. This change fixes the issue by making sure that, in those cases, a `nil` value is passed. Note that nested objects in the old architecture were correctly receiving NSNull, so nested objects were behaving correctly already. ## Changelog: [iOS][Fixed] - Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules Reviewed By: javache Differential Revision: D70723460 fbshipit-source-id: 384f48b6dbb3f54c369b31b6d2ee06069fa3591c
react-native-bot
commented
Mar 19, 2025
This pull request was successfully merged by @cipolleschi in 6314925 When will my fix make it into a release? | How to file a pick request? |
Summary: Pull Request resolved: #49873 In the old architecture, when we were passing a `null` value as a parameter in a function that accepted nullable parameter, the null value was mapped to `nil` on iOS. After my changes in [d423679](d423679), in the New Architecture, through the interop layer, legacy modules were receiving an `NSNull` object instead of nil. This was breaking those modules which started crashing or observing undesired behavior. This change fixes the issue by making sure that, in those cases, a `nil` value is passed. Note that nested objects in the old architecture were correctly receiving NSNull, so nested objects were behaving correctly already. ## Changelog: [iOS][Fixed] - Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules Reviewed By: javache Differential Revision: D70723460 fbshipit-source-id: 384f48b6dbb3f54c369b31b6d2ee06069fa3591c
react-native-bot
commented
Mar 19, 2025
This pull request was successfully merged by @cipolleschi in a133967 When will my fix make it into a release? | How to file a pick request? |
Summary:
In the old architecture, when we were passing a
nullvalue as a parameter in a function that accepted nullable parameter, the null value was mapped tonilon iOS.After my changes in d4236791e2, in the New Architecture, through the interop layer, legacy modules were receiving an
NSNullobject instead of nil.This was breaking those modules which started crashing or observing undesired behavior.
This change fixes the issue by making sure that, in those cases, a
nilvalue is passed.Note that nested objects in the old architecture were correctly receiving NSNull, so nested objects were behaving correctly already.
Changelog:
[iOS][Fixed] - Properly pass
nilfor nullable parameters instead ofNSNullfor legacy modulesDifferential Revision: D70723460