| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5b11042 commit 9c33e4b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,11 @@ const { | |||
| 22 | 22 | ERR_MISSING_ARGS | |
| 23 | 23 | } | |
| 24 | 24 | } = require('internal/errors'); | |
| 25 | - const { validateString, validateOneOf } = require('internal/validators'); | ||
| 25 | + const { | ||
| 26 | + validateArray, | ||
| 27 | + validateOneOf, | ||
| 28 | + validateString, | ||
| 29 | + } = require('internal/validators'); | ||
| 26 | 30 | const EventEmitter = require('events'); | |
| 27 | 31 | const net = require('net'); | |
| 28 | 32 | const dgram = require('dgram'); | |
@@ -356,11 +360,8 @@ ChildProcess.prototype.spawn = function(options) { | |||
| 356 | 360 | // Let child process know about opened IPC channel | |
| 357 | 361 | if (options.envPairs === undefined) | |
| 358 | 362 | options.envPairs = []; | |
| 359 | - else if (!ArrayIsArray(options.envPairs)) { | ||
| 360 | - throw new ERR_INVALID_ARG_TYPE('options.envPairs', | ||
| 361 | - 'Array', | ||
| 362 | - options.envPairs); | ||
| 363 | - } | ||
| 363 | + else | ||
| 364 | + validateArray(options.envPairs, 'options.envPairs'); | ||
| 364 | 365 | ||
| 365 | 366 | options.envPairs.push(`NODE_CHANNEL_FD=${ipcFd}`); | |
| 366 | 367 | options.envPairs.push(`NODE_CHANNEL_SERIALIZATION_MODE=${serialization}`); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments