Skip to content

Commit 43c2637

Browse files
committed
Fix cache false
1 parent cb19bfc commit 43c2637

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ function Postgres(url, options) {
270270
if (options.cache && typeof file === 'string')
271271
return query(q, connection || getConnection(), file, args || [])
272272

273-
const promise = (file || (files[path] = new Promise((resolve, reject) => {
273+
const promise = ((options.cache && file) || (files[path] = new Promise((resolve, reject) => {
274274
fs.readFile(path, 'utf8', (err, str) => {
275275
if (err)
276276
return reject(err)

0 commit comments

Comments
 (0)