From c9eceeb2d8cc436f11082191dd86a377ea75ed83 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Sat, 18 May 2024 16:11:33 -0300 Subject: [PATCH] Prevent iOS host object installation from getting the wrong bridge --- ios/RNSModule.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ios/RNSModule.mm b/ios/RNSModule.mm index 59452ae012..be05de43c7 100644 --- a/ios/RNSModule.mm +++ b/ios/RNSModule.mm @@ -138,8 +138,7 @@ - (void)installHostObject because depending on the selected architecture, only one method will be called. For `Paper`, it will be constantsToExport, and for `Fabric`, it will be getTurboModule. */ - RCTBridge *bridge = [RCTBridge currentBridge]; - RCTCxxBridge *cxxBridge = (RCTCxxBridge *)bridge; + RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge; if (cxxBridge != nil) { auto jsiRuntime = (jsi::Runtime *)cxxBridge.runtime; if (jsiRuntime != nil) {