Skip to content

Commit c3589f9

Browse files
committed
Fix concurrent transaction error
1 parent b58f7ba commit c3589f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ function Postgres(url, options) {
133133
)
134134
.then(() => reject(err))
135135
})
136-
.then(() => {
136+
.then(begin && (() => {
137137
connections.push(connection)
138138
next()
139-
})
139+
}))
140140

141141
function scoped(xs) {
142142
return query({}, connection, xs, Array.from(arguments).slice(1))

0 commit comments

Comments
 (0)