Commit 2e92a1a6 authored by Andres Suarez's avatar Andres Suarez Committed by Myles Borins
Browse files

module: move unnecessary work for early return

The exts and trailingSlash variables are only used if the
path isn't cached. This commit moves them further down in the
code, and changes from var to const.

PR-URL: https://github.com/nodejs/node/pull/3579


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarMichaël Zasso <mic.besace@gmail.com>
parent aefb20a9
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