Browse Source

………

main 2.5.0
Stian Fredrik Aune 1 year ago
parent
commit
43b7627cee
  1. 4
      webui-react/src/primitives/misc/Misc.tsx

4
webui-react/src/primitives/misc/Misc.tsx

@ -15,7 +15,7 @@ interface ValueProps {
}
export function FluffyValue({raw, valueKey}: ValueProps): JSX.Element | null {
if (typeof raw !== "number" && (raw[valueKey] === undefined || raw[valueKey] === null)) {
if (typeof raw !== "number" && (valueKey === "kpm" || (raw[valueKey] === undefined || raw[valueKey] === null))) {
return null;
}
@ -27,7 +27,7 @@ export function FluffyValue({raw, valueKey}: ValueProps): JSX.Element | null {
}
export function Value({raw, valueKey}: ValueProps): JSX.Element | null {
const actual = typeof raw === "number" ? raw : (raw[valueKey]);
const actual = typeof raw === "number" ? raw : (raw[valueKey as keyof Values]);
if (actual !== null && actual !== undefined) {
if (valueKey === "time") {

Loading…
Cancel
Save