Skip to content

Commit 94c760a

Browse files
committed
fixup: remove isStringObject check
1 parent a02a6f0 commit 94c760a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/net.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const {
115115
},
116116
genericNodeError,
117117
} = require('internal/errors');
118-
const { isStringObject, isUint8Array } = require('internal/util/types');
118+
const { isUint8Array } = require('internal/util/types');
119119
const { queueMicrotask } = require('internal/process/task_queues');
120120
const {
121121
guessHandleType,
@@ -1416,7 +1416,7 @@ function lookupAndConnect(self, options) {
14161416
// calls net.Socket.connect() on it (that's us). There are no event
14171417
// listeners registered yet so defer the error event to the next tick.
14181418
process.nextTick(connectErrorNT, self, err);
1419-
} else if ((typeof ip !== 'string' && !isStringObject(ip)) || !isIP(ip)) {
1419+
} else if ((typeof ip !== 'string') || !isIP(ip)) {
14201420
err = new ERR_INVALID_IP_ADDRESS(ip);
14211421
process.nextTick(connectErrorNT, self, err);
14221422
} else if (addressType !== 4 && addressType !== 6) {

0 commit comments

Comments
 (0)