Files
klz-cables.com/.pnpm-store/v10/files/cd/2f38f57602e65daca7c9a73c28a126698e03004c5ebb5dd068add0b924d7483a3fe615647a48ee66442615a6b3e17cbe0c7e9378561323ddae5b79e2105d15
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

18 lines
568 B
Plaintext

export const sanitizeFilterOptionsQuery = query => {
for (const key in query) {
const value = query[key];
if ((key.toLowerCase() === 'and' || key.toLowerCase() === 'or') && Array.isArray(value)) {
for (const val of value) {
sanitizeFilterOptionsQuery(val);
}
} else if (value && typeof value === 'object' && 'in' in value && Array.isArray(value.in) && value.in.length === 0) {
{
query[key] = {
exists: false
};
}
}
}
return query;
};
//# sourceMappingURL=sanitizeFilterOptionsQuery.js.map