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.mjs
CHANGED
|
@@ -3880,7 +3880,8 @@ const then = async (q, adapter, trx, beforeHooks, afterHooks, afterCommitHooks,
|
|
|
3880
3880
|
);
|
|
3881
3881
|
}
|
|
3882
3882
|
if (afterCommitHooks) {
|
|
3883
|
-
if (trx
|
|
3883
|
+
if (trx && // when inside test transactions, push to a transaction only unless it's the outer user transaction.
|
|
3884
|
+
(!trx.testTransactionCount || trx.transactionId + 1 > trx.testTransactionCount)) {
|
|
3884
3885
|
((_c = trx.afterCommit) != null ? _c : trx.afterCommit = []).push(
|
|
3885
3886
|
result,
|
|
3886
3887
|
q,
|