mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 21:53:30 +00:00
Fixed missing redbox at startup
Summary: Fixed bug where redbox errors thrown during startup would be dismissed as soon as JS loaded, so they would never be seen.
This commit is contained in:
parent
0e5422f36c
commit
f9abb5aae2
@ -282,7 +282,14 @@ RCT_NOT_IMPLEMENTED(-initWithBundleURL:(__unused NSURL *)bundleURL
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[RCTRedBox sharedInstance] dismiss];
|
static BOOL shouldDismiss = NO;
|
||||||
|
if (shouldDismiss) {
|
||||||
|
[[RCTRedBox sharedInstance] dismiss];
|
||||||
|
}
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
shouldDismiss = YES;
|
||||||
|
});
|
||||||
|
|
||||||
RCTSourceCode *sourceCodeModule = self.modules[RCTBridgeModuleNameForClass([RCTSourceCode class])];
|
RCTSourceCode *sourceCodeModule = self.modules[RCTBridgeModuleNameForClass([RCTSourceCode class])];
|
||||||
sourceCodeModule.scriptURL = bundleURL;
|
sourceCodeModule.scriptURL = bundleURL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user