diff --git a/.travis.yml b/.travis.yml index 90ce570..a943bf0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,3 +2,6 @@ language: node_js node_js: - "0.8" - "0.10" + - "4" + - "5" + - "6" diff --git a/index.js b/index.js index aef07e2..97d8935 100644 --- a/index.js +++ b/index.js @@ -214,6 +214,7 @@ function resolve(id, opts, cb) { // opts.packageFilter opts = opts || {}; + opts.filename = opts.filename || ''; var base = path.dirname(opts.filename); @@ -278,6 +279,8 @@ resolve.sync = function (id, opts) { // opts.packageFilter opts = opts || {}; + opts.filename = opts.filename || ''; + var base = path.dirname(opts.filename); if (opts.basedir) {