Files
klz-cables.com/.pnpm-store/v10/files/b5/098e294fa0dafad853e8306ec54962f1babf8438485476cc2a0e2ee9bd6ee0749f6e73fc93fe3a3067edd6ec8c1e54bc47caf6b134683d8f3a9ee737f0a413
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

13 lines
496 B
Plaintext

/**
* Returns current db transaction instance from req or adapter.drizzle itself
*
* If a transaction session doesn't exist (e.g., it was already committed/rolled back),
* falls back to the default adapter.drizzle instance to prevent errors.
*/ export const getTransaction = async (adapter, req)=>{
if (!req?.transactionID) {
return adapter.drizzle;
}
return adapter.sessions[await req.transactionID]?.db || adapter.drizzle;
};
//# sourceMappingURL=getTransaction.js.map