mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 21:53:30 +00:00
[Bridge] Make RCTJavaScriptDidFailToLoadNotification match DidLoad notif
Summary: Add the RCTBatchedBridge object to the notification's userInfo for consistency with RCTJavaScriptDidLoadNotification, and set the target object to `_parentBridge`. cc @nicklockwood @tadeuzagallo Closes https://github.com/facebook/react-native/pull/1243 Github Author: James Ide <ide@jameside.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
parent
ba9ef00ab9
commit
f40a7b4609
@ -1122,9 +1122,9 @@ RCT_INNER_BRIDGE_ONLY(_invokeAndProcessModule:(NSString *)module method:(NSStrin
|
||||
withDetails:[error localizedFailureReason]];
|
||||
}
|
||||
|
||||
NSDictionary *userInfo = @{@"error": error};
|
||||
NSDictionary *userInfo = @{@"bridge": self, @"error": error};
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptDidFailToLoadNotification
|
||||
object:self
|
||||
object:_parentBridge
|
||||
userInfo:userInfo];
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user