0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Rich Trott 26f8af9feb console: remove unreachable code
The current version of lib/internal/console/constructor.js includes this
as part of line 470:

  setlike ? iterKey : indexKey

However, `setlike` is guaranteed to be true because we are inside of an
`if` block (starting on line 463) that explicitly checks that `setlike`
is true.

Coverage reporting confirms that `setliked` is always true when it is
reached in our tests.

Remove the ternary as the value provided will always be `iterKey`.

PR-URL: https://github.com/nodejs/node/pull/26863
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-03-24 14:58:18 -07:00
..
internal console: remove unreachable code 2019-03-24 14:58:18 -07:00
_http_agent.js
_http_client.js lib: use Array#includes instead of Array#indexOf 2019-03-21 21:38:02 +08:00
_http_common.js
_http_incoming.js
_http_outgoing.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00
_http_server.js
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js lib: move extra properties into error creation 2019-03-21 22:52:08 +01:00
_stream_transform.js
_stream_wrap.js
_stream_writable.js
_tls_common.js tls: support TLSv1.3 2019-03-20 07:48:25 -07:00
_tls_wrap.js tls: support TLSv1.3 2019-03-20 07:48:25 -07:00
.eslintrc.yaml lib: validate Error.captureStackTrace() calls 2019-03-23 02:55:55 +01:00
assert.js lib: validate Error.captureStackTrace() calls 2019-03-23 02:55:55 +01:00
async_hooks.js
buffer.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00
child_process.js child_process: reduce internal usage of public require of util 2019-03-22 12:41:25 +08:00
cluster.js
console.js
constants.js
crypto.js
dgram.js dgram: remove usage of public require('util') 2019-03-23 18:37:39 +05:30
dns.js
domain.js
events.js lib: validate Error.captureStackTrace() calls 2019-03-23 02:55:55 +01:00
fs.js lib: validate Error.captureStackTrace() calls 2019-03-23 02:55:55 +01:00
http2.js
http.js
https.js https: remove usage of public require('util') 2019-03-23 18:40:24 +05:30
inspector.js
module.js
net.js lib: move extra properties into error creation 2019-03-21 22:52:08 +01:00
os.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00
path.js
perf_hooks.js perf_hooks: load internal/errors eagerly 2019-03-22 00:41:09 +01:00
process.js
punycode.js
querystring.js
readline.js readline: remove usage of require('util') 2019-03-23 12:18:32 +08:00
repl.js repl: check colors with .getColorDepth() 2019-03-21 23:34:14 +01:00
stream.js stream: reduce internal usage of public require of util 2019-03-22 00:48:32 +01:00
string_decoder.js
sys.js
timers.js timers: deprecate active() and _unrefActive() 2019-03-22 19:47:32 -07:00
tls.js lib: move extra properties into error creation 2019-03-21 22:52:08 +01:00
trace_events.js trace_events: remove usage of require('util') 2019-03-24 18:28:07 +08:00
tty.js
url.js lib: use Array#includes instead of Array#indexOf 2019-03-21 21:38:02 +08:00
util.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00
v8.js
vm.js
worker_threads.js
zlib.js lib: refactor Error.captureStackTrace() usage 2019-03-23 02:55:54 +01:00