We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb19bfc commit 43c2637Copy full SHA for 43c2637
lib/index.js
@@ -270,7 +270,7 @@ function Postgres(url, options) {
270
if (options.cache && typeof file === 'string')
271
return query(q, connection || getConnection(), file, args || [])
272
273
- const promise = (file || (files[path] = new Promise((resolve, reject) => {
+ const promise = ((options.cache && file) || (files[path] = new Promise((resolve, reject) => {
274
fs.readFile(path, 'utf8', (err, str) => {
275
if (err)
276
return reject(err)
0 commit comments