From e4887a587a51478dc0302701f48675e8f7175b72 Mon Sep 17 00:00:00 2001 From: Lulu Wu Date: Mon, 11 Dec 2023 06:06:12 -0800 Subject: [PATCH] Fix dev menu not open Summary: Bridgeless dev menu couldn't open due to self.bridge being null here. Changelog: [Android][Changed] - Fix dev menu not open for Bridgeless Reviewed By: cortinico Differential Revision: D51746610 fbshipit-source-id: 2e9bab686c965271bbfad264ff22ff61e28849c3 --- packages/react-native/React/CoreModules/RCTDevSettings.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/CoreModules/RCTDevSettings.mm b/packages/react-native/React/CoreModules/RCTDevSettings.mm index 346738bccb6362..b5e81c940e39f6 100644 --- a/packages/react-native/React/CoreModules/RCTDevSettings.mm +++ b/packages/react-native/React/CoreModules/RCTDevSettings.mm @@ -199,7 +199,7 @@ - (void)initialize #if RCT_DEV_MENU devMenuToken = [[RCTPackagerConnection sharedPackagerConnection] addNotificationHandler:^(id params) { - [self.bridge.devMenu show]; + [[self.moduleRegistry moduleForName:"DevMenu"] show]; } queue:dispatch_get_main_queue() forMethod:@"devMenu"];