mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
update product normalization
This commit is contained in:
@@ -19,9 +19,12 @@ const getProduct = async (options: {
|
||||
config = getConfig(config)
|
||||
|
||||
const product = await config.fetchSwell('products', 'get', [variables.slug])
|
||||
|
||||
if (product.variants) {
|
||||
product.variants = product.variants?.results
|
||||
}
|
||||
// console.log('product', product)
|
||||
return {
|
||||
product: product ? normalizeProduct(product) : null,
|
||||
product: normalizeProduct(product),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user