Files
klz-cables.com/.pnpm-store/v10/files/9d/cce6c5de5d597460b5844ebcce0d8ec0dca99ffed6f61d24b61cc306c32fe129137e16e8fbd16e424aa68c6a66cad4e7ac67992da133dbc85df9a176176026
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

26 lines
1.3 KiB
Plaintext

import { sanitizeCollection } from '../collections/config/sanitize.js';
import { createFolderCollection } from './createFolderCollection.js';
export async function addFolderCollection({ collectionSpecific, config, folderEnabledCollections, richTextSanitizationPromises = [], validRelationships = [] }) {
if (config.folders === false) {
return;
}
let folderCollectionConfig = createFolderCollection({
slug: config.folders.slug,
collectionSpecific,
debug: config.folders.debug,
folderEnabledCollections,
folderFieldName: config.folders.fieldName
});
const collectionIndex = config.collections.push(folderCollectionConfig);
if (Array.isArray(config.folders?.collectionOverrides) && config?.folders.collectionOverrides.length) {
for (const override of config.folders.collectionOverrides){
folderCollectionConfig = await override({
collection: folderCollectionConfig
});
}
}
const sanitizedCollectionWithOverrides = await sanitizeCollection(config, folderCollectionConfig, richTextSanitizationPromises, validRelationships);
config.collections[collectionIndex - 1] = sanitizedCollectionWithOverrides;
}
//# sourceMappingURL=addFolderCollection.js.map