Skip to content

Commit 2af1174

Browse files
committed
fixup: use non-normalized form for compat concerns
1 parent 5665ab8 commit 2af1174

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/internal/modules/cjs/loader.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -522,13 +522,10 @@ Module._findPath = function(request, paths, isMain) {
522522

523523
const isRelative = RegExpPrototypeTest(isWindows ? windowsRelativeCheck : nixRelativeCheck, request);
524524
let insidePath = true;
525-
let normalizedRequest = request;
526525
if (isRelative) {
527-
normalizedRequest = path.normalize(request);
526+
const normalizedRequest = path.normalize(request);
528527
if (StringPrototypeStartsWith(normalizedRequest, '..')) {
529528
insidePath = false;
530-
} else {
531-
normalizedRequest = `./${normalizedRequest}`;
532529
}
533530
}
534531

0 commit comments

Comments
 (0)