Skip to content

Commit d865560

Browse files
author
Toni Sharpe
committed
We don't want to overwrite req.pg that the dev may have set
Resolves #75
1 parent 5aed915 commit d865560

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function fastifyPostgres (fastify, options, next) {
126126

127127
req.pg[name] = client
128128
} else {
129-
if (req.pg && req.pg.query) {
129+
if (req.pg) {
130130
throw new Error('request client has already been registered')
131131
} else {
132132
req.pg = client

0 commit comments

Comments
 (0)