This commit is contained in:
seb
2026-10-16 02:31:54 +02:00
parent fcbcb243e3
commit 70e3ae7a87
2 changed files with 4 additions and 0 deletions

View File

@@ -666,6 +666,7 @@ export default class LibDashStore {
this.purge = storePurge(provider); this.purge = storePurge(provider);
this.initialize = storeInitialize(provider); this.initialize = storeInitialize(provider);
this.transaction = (fn) => provider.transaction(fn);
return this.initialize().then(() => this); return this.initialize().then(() => this);
} }

View File

@@ -69,6 +69,9 @@ export default function create(provider) {
return shape(row); return shape(row);
}; };
if (tx) {
return run(makeRunner(provider, tx), tx);
}
if (typeof provider?.transaction === 'function') { if (typeof provider?.transaction === 'function') {
return provider.transaction((runner, innerTx) => run(runner, innerTx)); return provider.transaction((runner, innerTx) => run(runner, innerTx));
} }