Skip to content

Commit

Permalink
Merge pull request #1893 from cjihrig/is-undefined
Browse files Browse the repository at this point in the history
src: remove use of util.isUndefined()
  • Loading branch information
k8s-ci-robot authored Sep 26, 2024
2 parents 9cc3815 + a272bd1 commit af86c9b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/portforward.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import WebSocket = require('isomorphic-ws');
import querystring = require('querystring');
import stream = require('stream');
import { isUndefined } from 'util';

import { KubeConfig } from './config';
import { WebSocketHandler, WebSocketInterface } from './web-socket-handler';
Expand All @@ -13,7 +12,7 @@ export class PortForward {
// handler is a parameter really only for injecting for testing.
constructor(config: KubeConfig, disconnectOnErr?: boolean, handler?: WebSocketInterface) {
this.handler = handler || new WebSocketHandler(config);
this.disconnectOnErr = isUndefined(disconnectOnErr) ? true : disconnectOnErr;
this.disconnectOnErr = disconnectOnErr === undefined ? true : disconnectOnErr;
}

// TODO: support multiple ports for real...
Expand Down

0 comments on commit af86c9b

Please sign in to comment.