mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
aa39cb6d9f
Summary: It's okay for TurboModules to not exist. Therefore, `__turboModuleProvider(moduleName)` should return null if `moduleName` doesn't refer to an actual TurboModule. The current implementation assumes that the TurboModule must exist, and therefore, it crashes the app when it doesn't (assertion error). This change is important because it helps us land D13887962. When we switch `I18nResources` to `TurboModuleRegistry` in D13887962, on Wilde, it won't be found in `NativeModules`. Therefore, we'll try to lookup this module in `__turboModuleProvider`, and this will crash the app. It seems like `I18nResources` is a Java-only module? Reviewed By: fkgozali Differential Revision: D13924589 fbshipit-source-id: 7ac7b1873e06852e5aafcaaef5c24cbc548ee444