Commit 26f8af9f authored by Rich Trott's avatar Rich Trott
Browse files

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: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarBeth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarYongsheng Zhang <zyszys98@gmail.com>
parent 4a40ea68
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment