From 5be7fae28614382882d1b68ef64b52de4b08d190 Mon Sep 17 00:00:00 2001 From: Tadeu Zagallo Date: Thu, 2 Apr 2015 13:34:50 -0700 Subject: [PATCH] [ReactNative] Allow recover from debugger error --- React/Base/RCTBridge.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/React/Base/RCTBridge.m b/React/Base/RCTBridge.m index 422a3da44..f7ac0fe19 100644 --- a/React/Base/RCTBridge.m +++ b/React/Base/RCTBridge.m @@ -592,7 +592,13 @@ static id _latestJSExecutor; }]; - if (_bundlePath != nil) { // Allow testing without a script + if (_javaScriptExecutor == nil) { + /** + * HACK (tadeu): If it failed to connect to the debugger, set loaded to true so we can + * reload + */ + _loaded = YES; + } else if (_bundlePath != nil) { // Allow testing without a script RCTJavaScriptLoader *loader = [[RCTJavaScriptLoader alloc] initWithBridge:self]; [loader loadBundleAtURL:[NSURL URLWithString:_bundlePath] onComplete:^(NSError *error) {