Skip to content

Commit

Permalink
Remove unnecessary packager running check when saved JSLocation is empty
Browse files Browse the repository at this point in the history
Summary:
Changelog:
When the JSLocation is nil, checking whether the address is running is unnesarry and wasting time, adding a JSLocation length check to mitigate that.

Reviewed By: cpojer

Differential Revision: D22644574

fbshipit-source-id: c51fc1a8976ebc25cba2653581e1bfa479a1d70d
  • Loading branch information
jimmy623 authored and facebook-github-bot committed Jul 21, 2020
1 parent da865b2 commit bbb7bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Base/RCTBundleURLProvider.mm
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ - (NSString *)packagerServerHost
{
NSString *location = [self jsLocation];
#if RCT_DEV_MENU
if (![RCTBundleURLProvider isPackagerRunning:location]) {
if ([location length] && ![RCTBundleURLProvider isPackagerRunning:location]) {
location = nil;
}
#endif
Expand Down

0 comments on commit bbb7bef

Please sign in to comment.