Skip to content

Commit

Permalink
πŸ› Fix query on transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D committed Aug 24, 2021
1 parent 70c9b18 commit 9f7199f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class Transaction_Firebird extends Transaction {
query(conn, method, status, value) {
const q = new Promise((resolve, reject) => {
const transaction = conn._transaction;
delete conn._transaction;
transaction[method]((error) => {
delete conn._transaction;
if (error) return reject(error);
resolve();
});
Expand All @@ -50,7 +50,7 @@ class Transaction_Firebird extends Transaction {
this._completed = true;
debug("%s error running transaction query", this.txid);
})
.tap(() => {
.then(() => {
if (status === 1) this._resolver(value);
if (status === 2) this._rejecter(value);
});
Expand Down

0 comments on commit 9f7199f

Please sign in to comment.