mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
auto-fixed prefer-const violation
This commit is contained in:
@@ -290,7 +290,7 @@ export class PortsAttributes extends Disposable {
|
||||
}
|
||||
|
||||
const attributes: PortAttributes[] = [];
|
||||
for (let attributesKey in settingValue) {
|
||||
for (const attributesKey in settingValue) {
|
||||
if (attributesKey === undefined) {
|
||||
continue;
|
||||
}
|
||||
@@ -379,7 +379,7 @@ export class PortsAttributes extends Disposable {
|
||||
}
|
||||
|
||||
public async addAttributes(port: number, attributes: Partial<Attributes>, target: ConfigurationTarget) {
|
||||
let settingValue = this.configurationService.inspect(PortsAttributes.SETTING);
|
||||
const settingValue = this.configurationService.inspect(PortsAttributes.SETTING);
|
||||
const remoteValue: any = settingValue.userRemoteValue;
|
||||
let newRemoteValue: any;
|
||||
if (!remoteValue || !isObject(remoteValue)) {
|
||||
@@ -541,7 +541,7 @@ export class TunnelModel extends Disposable {
|
||||
if (tunnelRestoreValue && (tunnelRestoreValue !== this.knownPortsRestoreValue)) {
|
||||
const tunnels = <Tunnel[] | undefined>JSON.parse(tunnelRestoreValue) ?? [];
|
||||
this.logService.trace(`ForwardedPorts: (TunnelModel) restoring ports ${tunnels.map(tunnel => tunnel.remotePort).join(', ')}`);
|
||||
for (let tunnel of tunnels) {
|
||||
for (const tunnel of tunnels) {
|
||||
if (!mapHasAddressLocalhostOrAllInterfaces(this.detected, tunnel.remoteHost, tunnel.remotePort)) {
|
||||
await this.forward({
|
||||
remote: { host: tunnel.remoteHost, port: tunnel.remotePort },
|
||||
|
||||
Reference in New Issue
Block a user