Skip to content

Commit e4cfd67

Browse files
committed
Fix resolve of succeeded transactions
1 parent b73f93e commit e4cfd67

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,13 @@ export default function Postgres(url, options) {
8787
query(true, connection, begin || savepoint)
8888
.then(() => {
8989
const result = fn(scoped)
90-
return (Array.isArray(result)
90+
return Array.isArray(result)
9191
? Promise.all(result)
9292
: result
93-
)
9493
})
9594
.then((x) =>
9695
begin
97-
? scoped`commit`
96+
? scoped`commit`.then(() => resolve(x))
9897
: resolve(x)
9998
)
10099
.catch((err) => {

0 commit comments

Comments
 (0)