Skip to content

Commit 7bfaf8c

Browse files
committed
fix: invalid promise resolution in transaction
1 parent fad1dd3 commit 7bfaf8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

package/src/operations/transaction.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,10 @@ export const transaction = (
108108

109109
return new Promise((resolve, reject) => {
110110
const tx: PendingTransaction = {
111-
start: () => {
111+
start: async () => {
112112
try {
113-
run().then(resolve)
113+
const result = await run()
114+
resolve(result)
114115
} catch (error) {
115116
reject(NitroSQLiteError.fromError(error))
116117
}

0 commit comments

Comments
 (0)