Skip to content

Commit

Permalink
Update resolve-package.es6.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko authored Dec 30, 2024
1 parent 7cbf244 commit b057e7c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions build/build-modules-js/init/common/resolve-package.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const { existsSync, readdirSync } = require('fs-extra');
*/
module.exports.resolvePackageFile = (relativePath) => {
for (let i = 0, l = module.paths.length; i < l; i += 1) {
const path = module.paths[i];
const fullPath = `${path}/${relativePath}`;
if (existsSync(fullPath)) {
return fullPath;
}
}
const path = module.paths[i];
const fullPath = `${path}/${relativePath}`;
if (existsSync(fullPath)) {
return fullPath;
}
}

return false;
return false;
};

/**
Expand Down

0 comments on commit b057e7c

Please sign in to comment.