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