fix(frontend): handle supplier price parsing in edit
This commit is contained in:
@@ -691,7 +691,11 @@ const submitEdition = async () => {
|
|||||||
constructeurIds,
|
constructeurIds,
|
||||||
}
|
}
|
||||||
|
|
||||||
const rawPrice = editionForm.supplierPrice.trim()
|
const rawPrice = typeof editionForm.supplierPrice === 'string'
|
||||||
|
? editionForm.supplierPrice.trim()
|
||||||
|
: editionForm.supplierPrice === null || editionForm.supplierPrice === undefined
|
||||||
|
? ''
|
||||||
|
: String(editionForm.supplierPrice).trim()
|
||||||
payload.supplierPrice = rawPrice
|
payload.supplierPrice = rawPrice
|
||||||
? Number.isNaN(Number(rawPrice))
|
? Number.isNaN(Number(rawPrice))
|
||||||
? null
|
? null
|
||||||
|
|||||||
Reference in New Issue
Block a user