Skip to content

Commit 48687fc

Browse files
committed
Fix relative load path for pg.js
1 parent cc20d98 commit 48687fc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ try {
88
pgdir = path.dirname(require.resolve('pg'))
99
} catch (e) {
1010
pgdir = path.dirname(require.resolve('pg.js'))
11-
}
12-
if(!pgdir) {
13-
throw new Error("Please install either `pg` or `pg.js` to use this module")
11+
if(!pgdir) {
12+
throw new Error("Please install either `pg` or `pg.js` to use this module")
13+
}
14+
pgdir = path.join(pgdir, 'lib')
1415
}
1516
var Result = require(path.join(pgdir, 'result'))
1617
var utils = require(path.join(pgdir, 'utils'))

0 commit comments

Comments
 (0)