Skip to content

Commit 871ea3a

Browse files
committed
refactor
1 parent 5f4814c commit 871ea3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/debug-adapter/nativeScriptDebugAdapter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export class NativeScriptDebugAdapter extends ChromeDebugAdapter {
148148
(ChromeDebugAdapter as any).SET_BREAKPOINTS_TIMEOUT = 20000;
149149

150150
this.isLiveSync = args.watch;
151-
transformedArgs.address = this.applyLoopbackAddress(transformedArgs.address, args.platform.toLowerCase());
151+
transformedArgs.address = this.getNormalizedAddress(transformedArgs.address, args.platform.toLowerCase());
152152

153153
return super.attach(transformedArgs);
154154
}
@@ -269,9 +269,9 @@ export class NativeScriptDebugAdapter extends ChromeDebugAdapter {
269269
});
270270
}
271271

272-
private applyLoopbackAddress(address: string, platform: string) {
272+
private getNormalizedAddress(address: string, platform: string) {
273+
// If it is undefined it will use 127.0.0.1 and will fail on iOS
273274
if (address === undefined && platform === "ios") {
274-
// If it is undefined it will use 127.0.0.1 and will fail on iOS
275275
return "localhost";
276276
}
277277
return address;

0 commit comments

Comments
 (0)