diff --git a/app/pages/product/create.vue b/app/pages/product/create.vue index 791dda5..3140cad 100644 --- a/app/pages/product/create.vue +++ b/app/pages/product/create.vue @@ -425,7 +425,11 @@ const buildPayload = () => { payload.constructeurIds = uniqueConstructeurIds(creationForm.constructeurIds) - const rawPrice = creationForm.supplierPrice.trim() + const rawPrice = typeof creationForm.supplierPrice === 'string' + ? creationForm.supplierPrice.trim() + : creationForm.supplierPrice === null || creationForm.supplierPrice === undefined + ? '' + : String(creationForm.supplierPrice).trim() if (rawPrice) { const parsed = Number(rawPrice) if (!Number.isNaN(parsed)) {