From f40a7b46091af9077378917ea516a0ed9011980a Mon Sep 17 00:00:00 2001 From: James Ide Date: Wed, 13 May 2015 08:25:27 -0700 Subject: [PATCH] [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 Test Plan: Imported from GitHub, without a `Test Plan:` line. --- React/Base/RCTBridge.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/React/Base/RCTBridge.m b/React/Base/RCTBridge.m index 7e21a44c2..750cb422f 100644 --- a/React/Base/RCTBridge.m +++ b/React/Base/RCTBridge.m @@ -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 {