Skip to content

Commit 644f814

Browse files
author
James Halliday
committed
passes pathfilter test
1 parent 60ff554 commit 644f814

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/async.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ module.exports = function resolve (x, opts, cb) {
7878
loadpkg(path.dirname(file), function (err, pkg, dir) {
7979
if (err) return cb(err)
8080
if (pkg && opts.pathFilter) {
81-
var rel = path.relative(dir, file);
81+
var rel = path.relative(dir, file)
82+
.slice(0, -exts[0].length)
83+
;
8284
var r = opts.pathFilter(pkg, x, rel);
8385
if (r) return load(
8486
extensions.slice(),

0 commit comments

Comments
 (0)