🐛 Affichage des unités dans l'interface

pull/481/head
Mael 2019-07-09 16:50:35 +02:00
parent c76f22a39b
commit aa0bbf2604
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ export let parseUnit = string => {
export let serialiseUnit = ({ numerators, denominators }) => {
let n = !isEmpty(numerators)
let d = !isEmpty(denominators)
return n && !d
return !n && !d
? ''
: n && !d
? numerators.join('')
: !n && d
? `/${denominators.join('')}`