1
0
Fork 0

Fixes bug due to not passing format to formatImperial (#211)

This commit is contained in:
woolishboy 2019-11-21 08:54:24 -06:00 committed by Joost De Cock
parent 9d1366b8b1
commit a095a2c8cd

View file

@ -21,7 +21,7 @@ const formatMm = (val, units, format = 'html') => {
let suffix = '' let suffix = ''
if (format === 'html') suffix = '"' if (format === 'html') suffix = '"'
let fraction128 = Math.round(rest * 128) let fraction128 = Math.round(rest * 128)
if (fraction128 == 0) return formatImperial(negative, inches) if (fraction128 == 0) return formatImperial(negative, inches, false, false, format)
if (fraction128 % 64 == 0) if (fraction128 % 64 == 0)
return formatImperial(negative, inches, fraction128 / 64, 2, format) + suffix return formatImperial(negative, inches, fraction128 / 64, 2, format) + suffix
if (fraction128 % 32 == 0) if (fraction128 % 32 == 0)