Skip to content

Commit f7fe1fe

Browse files
committed
refactor proxyUrl condition
1 parent 39f1ec8 commit f7fe1fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export class KubeConfig {
172172
opts.agentOptions = { servername: cluster.tlsServerName } as https.AgentOptions;
173173
}
174174

175-
if (cluster?.proxyUrl) {
175+
if (cluster && cluster.proxyUrl) {
176176
if (cluster.proxyUrl.startsWith('socks')) {
177177
opts.agent = new SocksProxyAgent.SocksProxyAgent(cluster.proxyUrl);
178178
} else {

0 commit comments

Comments
 (0)