mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 21:53:30 +00:00
Allow live reload even on errors.
Summary: Live reload is disabled when an error has occurred. This requires the developer to fix the error and then switch to the simulator to reload the device manually; impacting developer flow and increasing alt tabbing. This pull request fixes that by allowing live reload to work even on errors. This fixes issue: #1343. Closes https://github.com/facebook/react-native/pull/1549 Github Author: Ruben Niculcea <ruben.niculcea@gmail.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
parent
22ea66923f
commit
457fca4cb3
@ -995,6 +995,8 @@ RCT_INNER_BRIDGE_ONLY(_invokeAndProcessModule:(__unused NSString *)module
|
||||
return;
|
||||
}
|
||||
|
||||
[[RCTRedBox sharedInstance] dismiss];
|
||||
|
||||
RCTSourceCode *sourceCodeModule = self.modules[RCTBridgeModuleNameForClass([RCTSourceCode class])];
|
||||
sourceCodeModule.scriptURL = bundleURL;
|
||||
sourceCodeModule.scriptText = script;
|
||||
|
@ -119,6 +119,11 @@ RCT_EXPORT_MODULE()
|
||||
name:RCTJavaScriptDidLoadNotification
|
||||
object:nil];
|
||||
|
||||
[notificationCenter addObserver:self
|
||||
selector:@selector(jsLoaded:)
|
||||
name:RCTJavaScriptDidFailToLoadNotification
|
||||
object:nil];
|
||||
|
||||
_defaults = [NSUserDefaults standardUserDefaults];
|
||||
_settings = [[NSMutableDictionary alloc] init];
|
||||
_extraMenuItems = [NSMutableArray array];
|
||||
|
Loading…
x
Reference in New Issue
Block a user