Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround to avoid bridge access from ReactTextView for Venice
Summary: D14014668 introduced support for nesting views within Text on Android. Part of the implementation involved accessing the UIManagerModule from ReactTextView through context. This doesn't work in bridgeless RN because we have no UIManagerModule, and the ReactContext has no Catalyst instance. Trying to access the Catalyst instance from ReactContext throws an exception if it doesn't exist, so i'm just adding a simple check here to make sure the instance exists before proceeding. This means that this feature won't work in bridgeless mode, but that's ok for now - eventually we want to change the way this works so that it doesn't rely on accessing views in Java, which is potentially unsafe (there's nothing to stop you from mutating the views, and cpp/js would never know about it). Reviewed By: mdvacca Differential Revision: D15703100 fbshipit-source-id: 0448d55b8345fc707a25210a505cb6ac520c708a
- Loading branch information