pqb 0.39.3 → 0.39.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3882,7 +3882,8 @@ const then = async (q, adapter, trx, beforeHooks, afterHooks, afterCommitHooks,
|
|
|
3882
3882
|
);
|
|
3883
3883
|
}
|
|
3884
3884
|
if (afterCommitHooks) {
|
|
3885
|
-
if (trx
|
|
3885
|
+
if (trx && // when inside test transactions, push to a transaction only unless it's the outer user transaction.
|
|
3886
|
+
(!trx.testTransactionCount || trx.transactionId + 1 > trx.testTransactionCount)) {
|
|
3886
3887
|
((_c = trx.afterCommit) != null ? _c : trx.afterCommit = []).push(
|
|
3887
3888
|
result,
|
|
3888
3889
|
q,
|