esm: fix path normalization in finalizeResolution

PR-URL: https://github.com/nodejs/node/pull/62080
Refs: https://github.com/nodejs/node/pull/61478/changes/BASE..6cd90e1c0167f94c7dc671d10316e561c81f26af#r2871221559
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
Antoine du Hamel committed 2026-04-10 14:52:23 +02:00
1 parent 2c9436b43d
commit 679d18b57f
1 file changed
+1 -1
+1 -1
View File
@@ -245,7 +245,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
}
const stats = internalFsBinding.internalModuleStat(
StringPrototypeEndsWith(internalFsBinding, path, '/') ? StringPrototypeSlice(path, -1) : path,
StringPrototypeEndsWith(path, '/') ? StringPrototypeSlice(path, -1) : path,
);
// Check for stats.isDirectory()