mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: array rendering
This commit is contained in:
1 parent
5034ec1aa0
commit
99bae8f2c5
1 file changed
+14
-2
@@ -78,12 +78,24 @@ function Content({ id }: { id: string }) {
|
|||||||
|
|
||||||
if (Number.isFinite(characteristic)) {
|
if (Number.isFinite(characteristic)) {
|
||||||
if (entry.decimals === undefined) {
|
if (entry.decimals === undefined) {
|
||||||
|
if (typeof characteristic === "number") {
|
||||||
rendered = characteristic;
|
rendered = characteristic;
|
||||||
} else {
|
} else {
|
||||||
rendered = characteristic.toFixed(entry.decimals);
|
rendered = characteristic.join(", ");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rendered = `${Math.sign(characteristic) === 1 ? "" : "-"}∞`;
|
if (typeof characteristic === "number") {
|
||||||
|
rendered = characteristic.toFixed(entry.decimals);
|
||||||
|
} else {
|
||||||
|
rendered = characteristic
|
||||||
|
.map((c) => c.toFixed(entry.decimals))
|
||||||
|
.join(", ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rendered = `${
|
||||||
|
Math.sign(characteristic as number) === -1 ? "-" : ""
|
||||||
|
}∞`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in new issue
Block a user