Skip to content

Commit 48c9e3c

Browse files
committed
esm: fix check for trailing slash during resolve
The check was incorrectly altered in nodejs#54408, passing the bindings as argument for `this` instead of the path string. Signed-off-by: Cynthia Rey <[email protected]>
1 parent 8456a12 commit 48c9e3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/modules/esm/resolve.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
249249

250250
const stats = internalFsBinding.internalModuleStat(
251251
internalFsBinding,
252-
StringPrototypeEndsWith(internalFsBinding, path, '/') ? StringPrototypeSlice(path, -1) : path,
252+
StringPrototypeEndsWith(path, '/') ? StringPrototypeSlice(path, -1) : path,
253253
);
254254

255255
// Check for stats.isDirectory()

0 commit comments

Comments
 (0)