Skip to content

Commit

Permalink
fixup! src: fix require.resolve not considering paths . and ..
Browse files Browse the repository at this point in the history
…relative

fix linting
  • Loading branch information
dario-piotrowicz committed Jan 23, 2025
1 parent ab8728d commit c8424cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1969,7 +1969,7 @@ function createRequire(filename) {
* @returns {boolean} true if the path is relative, false otherwise
*/
function isRelative(path) {
if(StringPrototypeCharCodeAt(path, 0) !== CHAR_DOT) return false;
if (StringPrototypeCharCodeAt(path, 0) !== CHAR_DOT) { return false; }

return path === '.' || path === '..' ||
StringPrototypeStartsWith(path, './') ||
Expand Down

0 comments on commit c8424cc

Please sign in to comment.