mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +00:00
feat(poc): fix type error for crossSell
This commit is contained in:
parent
1cdb5d3343
commit
7ca79902d3
@ -59,7 +59,7 @@ export type ExtendedCrossSellingElementCollection = Omit<
|
||||
'products'
|
||||
> & {
|
||||
products?: ExtendedProduct[];
|
||||
};
|
||||
}[];
|
||||
|
||||
export type ExtendedCategory = Omit<schemas['Category'], 'children' | 'seoUrls' | 'cmsPage'> & {
|
||||
children?: ExtendedCategory[];
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user