File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
packages/react-native/React/CoreModules Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -442,18 +442,21 @@ - (void)setDefaultJSBundle
442442 NSString *port = portTextField.stringValue ;
443443 NSString *bundleRoot = entrypointTextField.stringValue ;
444444
445+ // If both IP and port are empty, reset to default
445446 if (ipAddress.length == 0 && port.length == 0 ) {
446447 [weakSelf setDefaultJSBundle ];
447448 return ;
448449 }
449450
451+ // Parse and validate port number
450452 NSNumberFormatter *formatter = [NSNumberFormatter new ];
451453 formatter.numberStyle = NSNumberFormatterDecimalStyle;
452454 NSNumber *portNumber = [formatter numberFromString: port];
453455 if (portNumber == nil ) {
454456 portNumber = [NSNumber numberWithInt: RCT_METRO_PORT];
455457 }
456458
459+ // Set the bundler location - matches iOS behavior
457460 [RCTBundleURLProvider sharedSettings ].jsLocation =
458461 [NSString stringWithFormat: @" %@ :%d " , ipAddress, portNumber.intValue];
459462
You can’t perform that action at this time.
0 commit comments