fix: parse numeric storage values

This commit is contained in:
2025-08-13 02:47:00 -06:00
parent 76bd4fb33b
commit 00792c5b10

View File

@@ -285,7 +285,10 @@ export default function DeviceDetails({ device, onBack }) {
const renderStorage = () => {
const toNum = (val) => {
if (val === undefined || val === null) return undefined;
const n = Number(val);
if (typeof val === "number") {
return Number.isNaN(val) ? undefined : val;
}
const n = parseFloat(String(val).replace(/[^0-9.]+/g, ""));
return Number.isNaN(n) ? undefined : n;
};