mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2026-09-28 15:45:58 +00:00
fix: 1/1 text
This commit is contained in:
@@ -231,7 +231,8 @@ export const Prices = new PriceService()
|
||||
export function displayRounding (value: number, fraction: boolean = false): string {
|
||||
if (fraction && Math.abs(value) < 1) {
|
||||
if (value === 0) return '0'
|
||||
return `1/${displayRounding(1 / value)}`
|
||||
const r = `1/${displayRounding(1 / value)}`
|
||||
return r === '1/1' ? '1' : r
|
||||
}
|
||||
if (Math.abs(value) < 10) {
|
||||
return Number(value.toFixed(1)).toString()
|
||||
|
||||
Reference in New Issue
Block a user