feat(poc): fix type error for crossSell

This commit is contained in:
Björn Meyer 2023-07-11 08:54:30 +02:00
parent 1cdb5d3343
commit 7ca79902d3
2 changed files with 1 additions and 2 deletions

View File

@ -59,7 +59,7 @@ export type ExtendedCrossSellingElementCollection = Omit<
'products'
> & {
products?: ExtendedProduct[];
};
}[];
export type ExtendedCategory = Omit<schemas['Category'], 'children' | 'seoUrls' | 'cmsPage'> & {
children?: ExtendedCategory[];

View File

@ -207,7 +207,6 @@ export async function getProductRecommendations(productId: string): Promise<Prod
const res = await requestCrossSell(productId, getDefaultCrossSellingCriteria());
// @ToDo: Make this more dynamic to merge multiple Cross-Sellings, at the moment we only get the first one
if (res && res[0] && res[0].products) {
// @ts-ignore (@ToDo: fix this wrong type ...)
products.elements = res[0].products;
}