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:
Ruben Niculcea 2015-06-22 06:55:35 -07:00
parent 22ea66923f
commit 457fca4cb3
2 changed files with 7 additions and 0 deletions

View File

@ -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;

View File

@ -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];