diff --git a/src/lib/monitor-adapter.js b/src/lib/monitor-adapter.js index ce4388b0f392630424bcc46d462767ee2c735d7c..e3c98667607b63d651d68aa12ddd2822ef2bbe05 100644 --- a/src/lib/monitor-adapter.js +++ b/src/lib/monitor-adapter.js @@ -37,7 +37,7 @@ export default function ({id, spriteName, index, opcode, params, value, x, y}) { if (isUndefined(y)) y = PADDING + (index * (PADDING + MONITOR_HEIGHT)); // If value is a number, round it to six decimal places - if (!isNaN(value)) { + if (typeof value === "number" || (typeof value === "string" && String(parseFloat(value)) === value)) { value = Number(Number(value).toFixed(6)); }