From 9a526cb8fe9d67b5548bfcfb969698f2411eae68 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 26 Oct 2016 22:41:24 -0400 Subject: [PATCH] child_process: remove unreachable code _convertCustomFds() is only called from normalizeSpawnArguments(), which always provides an options object. Therefore, there is no need to check for options in _convertCustomFds(). PR-URL: https://github.com/nodejs/node/pull/9307 Reviewed-By: Rich Trott Reviewed-By: Santiago Gimeno Reviewed-By: James M Snell --- lib/child_process.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/child_process.js b/lib/child_process.js index 69afdbe68d3c0a..ad8842e520c3be 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -300,7 +300,7 @@ var _deprecatedCustomFds = internalUtil.deprecate(function(options) { 'Use options.stdio instead.'); function _convertCustomFds(options) { - if (options && options.customFds && !options.stdio) { + if (options.customFds && !options.stdio) { _deprecatedCustomFds(options); } }