Fix build errors

This commit is contained in:
cond0r
2021-05-13 16:10:09 +03:00
parent e7d0f56e85
commit bff94e73ae
22 changed files with 87 additions and 458 deletions

View File

@@ -18,10 +18,12 @@ const getProduct = async (options: {
let { config, variables } = options ?? {}
config = getConfig(config)
const product = await config.fetchSwell('products', 'get', [variables.slug])
const product = await config.fetch('products', 'get', [variables.slug])
if (product && product.variants) {
product.variants = product.variants?.results
}
return {
product: product ? normalizeProduct(product) : null,
}