Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 43016e0

Browse files
ZYSzysrvagg
authored andcommittedNov 28, 2018
lib: remove useless cwd in posix.resolve
PR-URL: #23902 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 01f5284 commit 43016e0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed
 

‎lib/path.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1073,16 +1073,13 @@ const posix = {
10731073
resolve: function resolve() {
10741074
var resolvedPath = '';
10751075
var resolvedAbsolute = false;
1076-
var cwd;
10771076

10781077
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
10791078
var path;
10801079
if (i >= 0)
10811080
path = arguments[i];
10821081
else {
1083-
if (cwd === undefined)
1084-
cwd = process.cwd();
1085-
path = cwd;
1082+
path = process.cwd();
10861083
}
10871084

10881085
assertPath(path);

0 commit comments

Comments
 (0)
Please sign in to comment.