Parse shipping prices before getting lowest and highest

This commit is contained in:
Nadir Seghir 2022-12-22 17:35:09 +01:00
parent 3eb51342a9
commit fc720defb1
1 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,8 @@ export function getShippingPrices(
}
if (
lowestRate === undefined ||
currentRate.price < lowestRate.price
parseInt( currentRate.price, 10 ) <
parseInt( lowestRate.price, 10 )
) {
return currentRate;
}
@ -48,7 +49,8 @@ export function getShippingPrices(
}
if (
highestRate === undefined ||
currentRate.price > highestRate.price
parseInt( currentRate.price, 10 ) >
parseInt( highestRate.price, 10 )
) {
return currentRate;
}