Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console: remove unreachable code #26863

Closed
wants to merge 1 commit into from

Commits on Mar 22, 2019

  1. 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`.
    Trott committed Mar 22, 2019
    Configuration menu
    Copy the full SHA
    c0a4be4 View commit details
    Browse the repository at this point in the history