Files
klz-cables.com/.pnpm-store/v10/files/44/872fc790b05912a03e9a4db8228100a106116138cfe4de56b7bffad6d5c27cf0f10ce5f7182571a40cc13704ea3076ecdfca5a057685446d11444f175b6007
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

30 lines
1.1 KiB
Plaintext

import { parseParams } from './parseParams.js';
export function buildAndOrConditions({ adapter, aliasTable, context, fields, joins, locale, parentIsLocalized, selectFields, selectLocale, tableName, where }) {
const completedConditions = [];
// Loop over all AND / OR operations and add them to the AND / OR query param
// Operations should come through as an array
for (const condition of where){
// If the operation is properly formatted as an object
if (typeof condition === 'object') {
const result = parseParams({
adapter,
aliasTable,
context,
fields,
joins,
locale,
parentIsLocalized,
selectFields,
selectLocale,
tableName,
where: condition
});
if (result && Object.keys(result).length > 0) {
completedConditions.push(result);
}
}
}
return completedConditions;
}
//# sourceMappingURL=buildAndOrConditions.js.map