Fix display issues on web instance

This commit is contained in:
lowlighter committed 2021-02-03 12:43:21 +01:00
1 parent 1becb62d84
commit 8e3ad79f23
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -620,7 +620,7 @@
}
data.f.percentage = function (n, {rescale = true} = {}) {
return `${(n*(rescale ? 100 : 1)).toFixed(2)
.replace(/(?<=[.])([1-9]*)(0+)$/, (m, a, b) => a)
.replace(/[.]([1-9]*)(0+)$/, (m, a, b) => `.${a}`)
.replace(/[.]$/, "")}%`
}
data.f.ellipsis = function (text, {length = 20} = {}) {