| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 10370c5 commit 4174f13
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,6 +102,7 @@ const { | |||
| 102 | 102 | const { isUint8Array } = require('internal/util/types'); | |
| 103 | 103 | const { | |
| 104 | 104 | validateAbortSignal, | |
| 105 | + validateFunction, | ||
| 105 | 106 | validateInt32, | |
| 106 | 107 | validateNumber, | |
| 107 | 108 | validatePort, | |
@@ -1002,10 +1003,8 @@ function lookupAndConnect(self, options) { | |||
| 1002 | 1003 | return; | |
| 1003 | 1004 | } | |
| 1004 | 1005 | ||
| 1005 | - if (options.lookup && typeof options.lookup !== 'function') | ||
| 1006 | - throw new ERR_INVALID_ARG_TYPE('options.lookup', | ||
| 1007 | - 'Function', options.lookup); | ||
| 1008 | - | ||
| 1006 | + if (options.lookup !== undefined) | ||
| 1007 | + validateFunction(options.lookup, 'options.lookup'); | ||
| 1009 | 1008 | ||
| 1010 | 1009 | if (dns === undefined) dns = require('dns'); | |
| 1011 | 1010 | const dnsopts = { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments