File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
4141 _bridge = bridge;
4242
4343 _handlers = [NSMutableDictionary new ];
44- _handlers[@" reload" ] = [[RCTReloadPackagerMethod alloc ] initWithBridge: _bridge ];
45- _handlers[@" pokeSamplingProfiler" ] = [[RCTSamplingProfilerPackagerMethod alloc ] initWithBridge: _bridge ];
44+ _handlers[@" reload" ] = [[RCTReloadPackagerMethod alloc ] initWithBridge: bridge ];
45+ _handlers[@" pokeSamplingProfiler" ] = [[RCTSamplingProfilerPackagerMethod alloc ] initWithBridge: bridge ];
4646
4747 [self connect ];
4848 }
Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ - (instancetype)initWithDataSource:(id<RCTDevSettingsDataSource>)dataSource
141141{
142142 if (self = [super init ]) {
143143 _dataSource = dataSource;
144- [self _configurePackagerConnection ];
145144
146145 [[NSNotificationCenter defaultCenter ] addObserver: self
147146 selector: @selector (jsLoaded: )
@@ -156,6 +155,13 @@ - (instancetype)initWithDataSource:(id<RCTDevSettingsDataSource>)dataSource
156155 return self;
157156}
158157
158+ - (void )setBridge : (RCTBridge *)bridge
159+ {
160+ RCTAssert (_bridge == nil , @" RCTDevSettings module should not be reused" );
161+ _bridge = bridge;
162+ [self _configurePackagerConnection ];
163+ }
164+
159165- (dispatch_queue_t )methodQueue
160166{
161167 return dispatch_get_main_queue ();
You can’t perform that action at this time.
0 commit comments