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 () {
135
135
Object . keys ( files ) . forEach ( function ( key ) {
136
136
var r = files [ key ] ;
137
137
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 ;
139
139
if ( ! pkg . __dirname ) pkg . __dirname = dir ;
140
140
self . walk ( r . row , xtend ( self . top , {
141
141
filename : path . join ( dir , '_fake.js' )
@@ -466,7 +466,7 @@ Deps.prototype.lookupPackage = function (file, cb) {
466
466
if ( cached ) return nextTick ( cb , null , cached ) ;
467
467
if ( cached === false ) return nextTick ( cb , null , undefined ) ;
468
468
469
- var dirs = parents ( path . dirname ( file ) ) ;
469
+ var dirs = parents ( file ? path . dirname ( file ) : self . basedir ) ;
470
470
471
471
( function next ( ) {
472
472
if ( dirs . length === 0 ) {
You can’t perform that action at this time.
0 commit comments