mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 05:34:15 +00:00
Fix packager reload command not working
Reviewed By: yungsters, mmmulani Differential Revision: D5061001 fbshipit-source-id: 8b75c95525f90955a8dc2054861ad3b6e25eab1d
This commit is contained in:
parent
f8b683b3ee
commit
49c4c0c942
@ -41,8 +41,8 @@
|
||||
_bridge = bridge;
|
||||
|
||||
_handlers = [NSMutableDictionary new];
|
||||
_handlers[@"reload"] = [[RCTReloadPackagerMethod alloc] initWithBridge:_bridge];
|
||||
_handlers[@"pokeSamplingProfiler"] = [[RCTSamplingProfilerPackagerMethod alloc] initWithBridge:_bridge];
|
||||
_handlers[@"reload"] = [[RCTReloadPackagerMethod alloc] initWithBridge:bridge];
|
||||
_handlers[@"pokeSamplingProfiler"] = [[RCTSamplingProfilerPackagerMethod alloc] initWithBridge:bridge];
|
||||
|
||||
[self connect];
|
||||
}
|
||||
|
@ -141,7 +141,6 @@ RCT_EXPORT_MODULE()
|
||||
{
|
||||
if (self = [super init]) {
|
||||
_dataSource = dataSource;
|
||||
[self _configurePackagerConnection];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(jsLoaded:)
|
||||
@ -156,6 +155,13 @@ RCT_EXPORT_MODULE()
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setBridge:(RCTBridge *)bridge
|
||||
{
|
||||
RCTAssert(_bridge == nil, @"RCTDevSettings module should not be reused");
|
||||
_bridge = bridge;
|
||||
[self _configurePackagerConnection];
|
||||
}
|
||||
|
||||
- (dispatch_queue_t)methodQueue
|
||||
{
|
||||
return dispatch_get_main_queue();
|
||||
|
Loading…
x
Reference in New Issue
Block a user