Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,10 @@ - (void)handleBundleLoadingError:(NSError *)error

- (void)_loadJSBundle:(NSURL *)sourceURL
{
// DevSettings is needed by _loadScriptFromSource's callback, so it must be initialized first. Doing it before
// the request, not after a successful load, also lets Metro reload when the initial bundle request fails.
[_turboModuleManager moduleForName:"DevSettings"];

#if RCT_DEV_MENU && __has_include(<React/RCTDevLoadingViewProtocol.h>)
{
id<RCTDevLoadingViewProtocol> loadingView =
Expand Down Expand Up @@ -567,7 +571,6 @@ - (void)_loadJSBundle:(NSURL *)sourceURL
[strongSelf handleBundleLoadingError:error];
return;
}
// DevSettings module is needed by _loadScriptFromSource's callback so prior initialization is required
RCTDevSettings *const devSettings =
(RCTDevSettings *)[strongSelf->_turboModuleManager moduleForName:"DevSettings"];
[strongSelf _loadScriptFromSource:source];
Expand Down
Loading