fix: valider data.image.src dans uploadProductImage
This commit is contained in:
@@ -76,5 +76,8 @@ export async function uploadProductImage(
|
||||
}
|
||||
|
||||
const data = await res.json()
|
||||
if (!data.image?.src) {
|
||||
throw new Error('Shopify response invalide : champ image.src manquant')
|
||||
}
|
||||
return { url: data.image.src as string }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user