Skip to content

Commit

Permalink
refactor: do not resolve module path twice
Browse files Browse the repository at this point in the history
  • Loading branch information
honzajavorek committed Apr 9, 2019
1 parent 2ed04d9 commit da645b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resolveModule.js
Expand Up @@ -5,6 +5,6 @@ const path = require('path');
module.exports = function resolveModule(workingDirectory, moduleName) {
const absolutePath = path.resolve(workingDirectory, moduleName);
return fs.existsSync(absolutePath) || fs.existsSync(`${absolutePath}.js`)
? path.resolve(absolutePath)
? absolutePath
: moduleName;
};

0 comments on commit da645b2

Please sign in to comment.