mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-28 08:07:25 +08:00
Scope RCTReloadNotification to one bridge
Summary: At the moment, posting RCTReloadNotification in any circumstance causes all RCTBridge instances to reload. This change scopes the notification to the bridge for which it was intended. Closes https://github.com/facebook/react-native/pull/8762 Differential Revision: D3831914 fbshipit-source-id: ff29574f574ecd1a403057ddd0458dea38f0136e
This commit is contained in:
committed by
Facebook Github Bot 2
parent
efd8b10135
commit
afde9da93d
@@ -57,7 +57,7 @@ RCT_EXPORT_METHOD(reportFatalException:(NSString *)message
|
||||
static NSUInteger reloadRetries = 0;
|
||||
if (!RCT_DEBUG && reloadRetries < _maxReloadAttempts) {
|
||||
reloadRetries++;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RCTReloadNotification object:nil];
|
||||
[_bridge requestReload];
|
||||
} else {
|
||||
NSString *description = [@"Unhandled JS Exception: " stringByAppendingString:message];
|
||||
NSDictionary *errorInfo = @{ NSLocalizedDescriptionKey: description, RCTJSStackTraceKey: stack };
|
||||
|
||||
Reference in New Issue
Block a user