Files
klz-cables.com/.pnpm-store/v10/files/32/098e66a583cd9f6359aaaeb8d794b6a07a503c2e3c5c262a4b622f54a7762d8b9f54d9057f3ec02cdc693efac21eb08c973dd99ea2210d5cf361b0560d6340
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

23 lines
639 B
Plaintext

const blacklistedKeys = ['validate', 'customComponents'];
const sanitizeField = incomingField => {
const field = {
...incomingField
} // shallow copy, as we only need to remove top-level keys
;
for (const key of blacklistedKeys) {
delete field[key];
}
return field;
};
/**
* Takes in FormState and removes fields that are not serializable.
* Returns FormState without blacklisted keys.
*/
export const reduceToSerializableFields = fields => {
const result = {};
for (const key in fields) {
result[key] = sanitizeField(fields[key]);
}
return result;
};
//# sourceMappingURL=reduceToSerializableFields.js.map