Files
klz-cables.com/.pnpm-store/v10/files/ac/864842a078fb5b5b1cc408abab384bb0fee890a7760504b010a4320fdac91667322011b4a4b964b38985273159a686365a327ef75c6ef4f7afe2dec812e52f
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

1 line
1.6 KiB
Plaintext

{"version":3,"file":"reduceToSerializableFields.js","names":["blacklistedKeys","sanitizeField","incomingField","field","key","reduceToSerializableFields","fields","result"],"sources":["../../../src/forms/Form/reduceToSerializableFields.ts"],"sourcesContent":["import { type FormField, type FormState } from 'payload'\n\ntype BlacklistedKeys = 'customComponents' | 'validate'\nconst blacklistedKeys: BlacklistedKeys[] = ['validate', 'customComponents']\n\nconst sanitizeField = (incomingField: FormField): FormField => {\n const field = { ...incomingField } // shallow copy, as we only need to remove top-level keys\n\n for (const key of blacklistedKeys) {\n delete field[key]\n }\n\n return field\n}\n\n/**\n * Takes in FormState and removes fields that are not serializable.\n * Returns FormState without blacklisted keys.\n */\nexport const reduceToSerializableFields = (\n fields: FormState,\n): {\n [key: string]: Omit<FormField, BlacklistedKeys>\n} => {\n const result: Record<string, Omit<FormField, BlacklistedKeys>> = {}\n\n for (const key in fields) {\n result[key] = sanitizeField(fields[key])\n }\n\n return result\n}\n"],"mappings":"AAGA,MAAMA,eAAA,GAAqC,CAAC,YAAY,mBAAmB;AAE3E,MAAMC,aAAA,GAAiBC,aAAA;EACrB,MAAMC,KAAA,GAAQ;IAAE,GAAGD;EAAc,EAAE;AAAA;EAEnC,KAAK,MAAME,GAAA,IAAOJ,eAAA,EAAiB;IACjC,OAAOG,KAAK,CAACC,GAAA,CAAI;EACnB;EAEA,OAAOD,KAAA;AACT;AAEA;;;;AAIA,OAAO,MAAME,0BAAA,GACXC,MAAA;EAIA,MAAMC,MAAA,GAA2D,CAAC;EAElE,KAAK,MAAMH,GAAA,IAAOE,MAAA,EAAQ;IACxBC,MAAM,CAACH,GAAA,CAAI,GAAGH,aAAA,CAAcK,MAAM,CAACF,GAAA,CAAI;EACzC;EAEA,OAAOG,MAAA;AACT","ignoreList":[]}