File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ Deps.prototype._flush = function () {
135135 Object . keys ( files ) . forEach ( function ( key ) {
136136 var r = files [ key ] ;
137137 var pkg = r . pkg || { } ;
138- var dir = path . dirname ( r . row . file ) ;
138+ var dir = r . row . file ? path . dirname ( r . row . file ) : self . basedir ;
139139 if ( ! pkg . __dirname ) pkg . __dirname = dir ;
140140 self . walk ( r . row , xtend ( self . top , {
141141 filename : path . join ( dir , '_fake.js' )
@@ -466,7 +466,7 @@ Deps.prototype.lookupPackage = function (file, cb) {
466466 if ( cached ) return nextTick ( cb , null , cached ) ;
467467 if ( cached === false ) return nextTick ( cb , null , undefined ) ;
468468
469- var dirs = parents ( path . dirname ( file ) ) ;
469+ var dirs = parents ( file ? path . dirname ( file ) : self . basedir ) ;
470470
471471 ( function next ( ) {
472472 if ( dirs . length === 0 ) {
You can’t perform that action at this time.
0 commit comments