Files
klz-cables.com/.pnpm-store/v10/files/7f/39b97a7c6223541f1ab9d0f1920c33cdb03b7014385d0d9e118bf6667d9c685ea139337f84af3a327cffeefd6096de91a1aa73609212f7319c333cee24ee33
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

21 lines
561 B
Plaintext

// Flatten rows to object with path keys
// for easier retrieval
export const createPathMap = (rows)=>{
let rowsByPath = {};
if (Array.isArray(rows)) {
rowsByPath = rows.reduce((res, row)=>{
const formattedRow = {
...row
};
delete formattedRow.path;
if (!res[row.path]) {
res[row.path] = [];
}
res[row.path].push(row);
return res;
}, {});
}
return rowsByPath;
};
//# sourceMappingURL=createRelationshipMap.js.map