Files
klz-cables.com/.pnpm-store/v10/files/c3/806ef8aac38146bf877a347fa9aefc5b80fb4af86ec2826048d13f71f8e40c0d63fae2e9545ff0f460bbab372281528a38ea01fbcaf77154f340de73d34847
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,"sources":["../../src/utilities/applyLocaleFiltering.ts"],"sourcesContent":["import type { ClientConfig } from '../config/client.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type { PayloadRequest } from '../types/index.js'\n\nexport async function applyLocaleFiltering({\n clientConfig,\n config,\n req,\n}: {\n clientConfig: ClientConfig\n config: SanitizedConfig\n req: PayloadRequest\n}): Promise<void> {\n if (\n !clientConfig.localization ||\n !config.localization ||\n typeof config.localization.filterAvailableLocales !== 'function'\n ) {\n return\n }\n\n const filteredLocales = (\n await config.localization.filterAvailableLocales({\n locales: config.localization.locales,\n req,\n })\n ).map(({ toString, ...rest }) => rest)\n\n clientConfig.localization.localeCodes = filteredLocales.map(({ code }) => code)\n clientConfig.localization.locales = filteredLocales\n}\n"],"names":["applyLocaleFiltering","clientConfig","config","req","localization","filterAvailableLocales","filteredLocales","locales","map","toString","rest","localeCodes","code"],"mappings":"AAIA,OAAO,eAAeA,qBAAqB,EACzCC,YAAY,EACZC,MAAM,EACNC,GAAG,EAKJ;IACC,IACE,CAACF,aAAaG,YAAY,IAC1B,CAACF,OAAOE,YAAY,IACpB,OAAOF,OAAOE,YAAY,CAACC,sBAAsB,KAAK,YACtD;QACA;IACF;IAEA,MAAMC,kBAAkB,AACtB,CAAA,MAAMJ,OAAOE,YAAY,CAACC,sBAAsB,CAAC;QAC/CE,SAASL,OAAOE,YAAY,CAACG,OAAO;QACpCJ;IACF,EAAC,EACDK,GAAG,CAAC,CAAC,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAKA;IAEjCT,aAAaG,YAAY,CAACO,WAAW,GAAGL,gBAAgBE,GAAG,CAAC,CAAC,EAAEI,IAAI,EAAE,GAAKA;IAC1EX,aAAaG,YAAY,CAACG,OAAO,GAAGD;AACtC"}