fix: Display '1x' rather than '1/1x'
This commit is contained in:
parent
f0525245de
commit
26743ee05e
|
@ -43,7 +43,11 @@ let displayFunctionSlider = (value) => {
|
|||
result = toLocale(transformSliderValueToPracticalValue(value))
|
||||
} else {
|
||||
let inverseresult = toLocale(transformSliderValueToPracticalValue(-value))
|
||||
result = `1/${inverseresult}`
|
||||
if(inverseresult == 1){
|
||||
result = '1'
|
||||
}else{
|
||||
result = `1/${inverseresult}`
|
||||
}
|
||||
}
|
||||
result = `The first option is ${result}x as valuable as the second one`
|
||||
return result
|
||||
|
|
|
@ -53,7 +53,11 @@ let displayFunctionSlider = (value) => {
|
|||
result = toLocale(transformSliderValueToPracticalValue(value))
|
||||
} else {
|
||||
let inverseresult = toLocale(transformSliderValueToPracticalValue(-value))
|
||||
result = `1/${inverseresult}`
|
||||
if(inverseresult == 1){
|
||||
result = '1'
|
||||
}else{
|
||||
result = `1/${inverseresult}`
|
||||
}
|
||||
}
|
||||
result = `The first option is ${result}x as valuable as the second one`
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue
Block a user