From 932c04cc9996f8e67386b42633cc38feb0a24afd Mon Sep 17 00:00:00 2001 From: Javier Fraire Date: Fri, 18 Dec 2020 11:07:52 -0800 Subject: [PATCH] Back out "Roll out RCTNetworking extraneous NativeModule call removal" Summary: It broke Forecast. Original commit changeset: 0da20475a088 Changelog: [Internal] Differential Revision: D25641098 fbshipit-source-id: 94daf0479963745bbca50b409b5a1dec1c8e8e71 --- Libraries/Network/RCTNetworking.ios.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/Network/RCTNetworking.ios.js b/Libraries/Network/RCTNetworking.ios.js index b10a833ad1..bc1081aab3 100644 --- a/Libraries/Network/RCTNetworking.ios.js +++ b/Libraries/Network/RCTNetworking.ios.js @@ -18,8 +18,13 @@ import type {RequestBody} from './convertRequestBody'; class RCTNetworking extends NativeEventEmitter { constructor() { + const disableCallsIntoModule = + typeof global.__disableRCTNetworkingExtraneousModuleCalls === 'function' + ? global.__disableRCTNetworkingExtraneousModuleCalls() + : false; + super(NativeNetworkingIOS, { - __SECRET_DISABLE_CALLS_INTO_MODULE_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: true, + __SECRET_DISABLE_CALLS_INTO_MODULE_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: disableCallsIntoModule, }); }