Skip to content

Commit bbb7bef

Browse files
jimmy623facebook-github-bot
authored andcommitted
Remove unnecessary packager running check when saved JSLocation is empty
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
1 parent da865b2 commit bbb7bef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

React/Base/RCTBundleURLProvider.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ - (NSString *)packagerServerHost
126126
{
127127
NSString *location = [self jsLocation];
128128
#if RCT_DEV_MENU
129-
if (![RCTBundleURLProvider isPackagerRunning:location]) {
129+
if ([location length] && ![RCTBundleURLProvider isPackagerRunning:location]) {
130130
location = nil;
131131
}
132132
#endif

0 commit comments

Comments
 (0)