Show redbox when no bundle is present
Reviewed By: shergin Differential Revision: D4405409 fbshipit-source-id: 847fc559121dcde844f1ee3c6d02206e9e27803b
This commit is contained in:
parent
09a83f976e
commit
a94418fdd3
|
@ -192,9 +192,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithDelegate:(id<RCTBridgeDelegate>)dele
|
|||
[self.delegate loadSourceForBridge:_parentBridge onProgress:onProgress onComplete:onSourceLoad];
|
||||
} else if ([self.delegate respondsToSelector:@selector(loadSourceForBridge:withBlock:)]) {
|
||||
[self.delegate loadSourceForBridge:_parentBridge withBlock:onSourceLoad];
|
||||
} else if (!self.bundleURL) {
|
||||
NSError *error = RCTErrorWithMessage(@"No bundle URL present.\n\nMake sure you're running a packager " \
|
||||
"server or have included a .jsbundle file in your application bundle.");
|
||||
onSourceLoad(error, nil, 0);
|
||||
} else {
|
||||
RCTAssert(self.bundleURL, @"bundleURL must be non-nil when not implementing loadSourceForBridge");
|
||||
|
||||
[RCTJavaScriptLoader loadBundleAtURL:self.bundleURL onProgress:onProgress onComplete:^(NSError *error, NSData *source, int64_t sourceLength) {
|
||||
if (error && [self.delegate respondsToSelector:@selector(fallbackSourceURLForBridge:)]) {
|
||||
NSURL *fallbackURL = [self.delegate fallbackSourceURLForBridge:self->_parentBridge];
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
#include <cxxabi.h>
|
||||
|
||||
#import "RCTAssert.h"
|
||||
#import "RCTBridge.h"
|
||||
#import "RCTBridge+Private.h"
|
||||
#import "RCTBridge.h"
|
||||
#import "RCTDefines.h"
|
||||
#import "RCTRedBox.h"
|
||||
#import "RCTUtils.h"
|
||||
|
@ -229,7 +229,7 @@ void _RCTLogNativeInternal(RCTLogLevel level, const char *fileName, int lineNumb
|
|||
}
|
||||
|
||||
NSRange range = NSMakeRange(0, frameSymbols.length);
|
||||
NSTextCheckingResult *match = [nativeStackFrameRegex() firstMatchInString:frameSymbols options:0 range:range];
|
||||
NSTextCheckingResult *match = [nativeStackFrameRegex() firstMatchInString:frameSymbols options:0 range:range];
|
||||
if (!match) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue