1
0
Fork 0

chore: Fixed linter warnings in utils

This commit is contained in:
Joost De Cock 2020-02-22 08:46:32 +01:00
parent 1bb91c395c
commit eaa88fae7f

View file

@ -34,8 +34,8 @@ const formatMm = (val, units, format = 'html') => {
return formatImperial(negative, inches, fraction128 / 4, 32, format) + suffix return formatImperial(negative, inches, fraction128 / 4, 32, format) + suffix
if (fraction128 % 2 == 0) if (fraction128 % 2 == 0)
return formatImperial(negative, inches, fraction128 / 2, 64, format) + suffix return formatImperial(negative, inches, fraction128 / 2, 64, format) + suffix
if (format === 'html') return negative + Math.round(fraction * 100) / 100 + suffix
else return negative + Math.round(fraction * 100) / 100 + suffix return negative + Math.round(fraction * 100) / 100 + suffix
} else { } else {
if (format === 'html') return roundMm(val / 10) + 'cm' if (format === 'html') return roundMm(val / 10) + 'cm'
else return roundMm(val / 10) else return roundMm(val / 10)